How do I access the page id variable in FE tpl?
Because the variable $this=>id does not seem to be available in my FE template, my current solution is to test for a specific page by using $this=>pageTitle - that has some obvious draw backs.
I tried the place holder {{env::page_id}} but it behaves oddly - The value seems to be inserted but my conditionals don't work with it. I think it evaluates after the PHP code runs.
I can live with my current solution but I'd like to know for the future.
Re: How do I access the page id variable in FE tpl?
you may try using
Code:
global $objPage;
echo $objPage->id;
Re: How do I access the page id variable in FE tpl?
Thanks works great, thanks so much.