I see in the Insert tags list, you can get the parent page alias, but no mention of an ID (like you can with the current page_id). Is it possible to get that through a variable of some kind?
I see in the Insert tags list, you can get the parent page alias, but no mention of an ID (like you can with the current page_id). Is it possible to get that through a variable of some kind?
if you need it in a template you can useOriginally Posted by harley77
Code:$GLOBALS['objPage']->pid
Consulenza Contao CMS https://www.intco.it
THANK YOU. Holy cow this will save me a lot of work. The location where I was needing this is in a conditional statement for a Catalog List. I couldn't figure out how to use the Global you posted directly in the box, however, I was able to make a simple php file with it, and then call it using the {{file:*}} insert tag.
The final Code looks like this:
FIND_IN_SET( {{file:arentid.php}} , item_pagelocation )>0
The end result is a catalog list that will show a listing of items associated with the parent page of the current location.
I know there may be a better way, but this works and I thank you.
Bookmarks