I'm trying to create a new page in Alfresco, but the tutorials gives to me the information that i have to create three files: new-page.get.js, new-page.html.ftl and new-page.get.xml , like Aikau - http://docs.alfresco.com/5.0/concepts/dev-extensions-share-page-creation.html
But the javascript is different, for example, I try to get the current URL with: window.location.search or make console.logor alert. But, in this three cases, I got "undefined" like "window is undefined"
Why is this javascript different? What type of javascript is? Where I can get tutorials, for example, to program this javascripts?
I want to make a window.location.search to get the current URL , but if I don't have this command, what can I use for this effect?