contao/test — Issue #276: Add inserttag for current page ID
Author: importer
Created: 2011-11-28 16:31:38+00:00
State: open
Labels: Feature, frontend

This has been requested many times. People want to refer to the tl_page table by using the current page ID. Up to now, they have to use the other variables {{env::page_alias}}, which can change then the client renames the page.

Typical scenario is inside a module where you want to make the module use a condition clause that is checking the ID of the current page, e.g.
pagecategory={{env::page_id}}

Note. Don't want to place the actual ID in the place of "id", the inserttag should return the current page ID, e.g. 6.

Perhaps I can suggest that you move the current page variables to be returned as you do with the {{user::xxx}} inserttag, e.g.
{{page::xxxx}}

{{page::id}}
{{page::name}}
{{page::alias}}

--- _Originally created by thyon on November 20th, 2008, at 07:03am (ID 276)_