Results 1 to 3 of 3

Thread: How do I access the page id variable in FE tpl?

  1. #1
    User
    Join Date
    12-11-09.
    Location
    New York, NY USA
    Posts
    87

    Default 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:age_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.

  2. #2
    User
    Join Date
    06-19-09.
    Location
    Kosice, Slovakia
    Posts
    61

    Default Re: How do I access the page id variable in FE tpl?

    you may try using
    Code:
    global $objPage;
    echo $objPage->id;
    S.C.A.R.E

  3. #3
    User
    Join Date
    12-11-09.
    Location
    New York, NY USA
    Posts
    87

    Default Re: How do I access the page id variable in FE tpl?

    Thanks works great, thanks so much.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •