In my page template (for all pages of my site) I created some custom javascript that needs to know page context, that is the page id or page alias or page URL, so the script can do different things depending on which page the script is executed.
Is there any {} tag that would insert page URL or page alias or page ID ?
e.g,
<span id="pageid">{page-alias}</span>
or
<span id="pageid">{page-ur}</span>
that would expand to
<span id="pageid">about</span>
<span id="pageid">http://mysite.com/index.php?page=about</span>
then in my script I could use jquery to get the value of #pageid element to establish the page context for the script.
cheers.
Tag that would return page name/id/url ?
Re: Tag that would return page name/id/url ?
page alias: {$page_alias}
current URL: {cms_selflink href=$page_alias}
current URL: {cms_selflink href=$page_alias}
[solved] Tag that would return page name/id/url ?
{cms_selflink href=$page_alias} <= that is beautiful !
thanks wishbone
thanks wishbone