Custom tag has access to where it is being called?

i created a custom tag which does quite a few things and i have been trying to access the current page/uid/structure whatever to use inside tag.

when i am trying to add a $page object to my tag - it’s not giving me the place e.g. subpage where the custom tag has been used but the parent where the script is calling everything…


  • I am running my script which runs though several subpages, where at any point there are a few custom tags page object will contain /parent-page/running/script/
  • i want to get informations directly inside the tag where it’s currentlyplaced /parent-page/running/script/custom-tag-is-in-subpage/

while i only have been trying

$page = page();

While I don’t quite understand what you are trying to say, you can get the current page with $tag->page(). If that’s not what you want, maybe post some code?

$tag->page() was what i wanted, thanks :slight_smile: