Sorry, this has undoubtedly been answered before, but I couldn’t find it...
How can I read the id of the current page? I didn’t see any relevant template variables for that.
I would like to use this in some Snippet calls, e.g.
[!Wayfinder?startId=`[*this_page_id*]` ... !]
The idea is that the Snippet could live in a template or in a chunk, but it will be called on different pages, so I don’t want to have to manually update the startId each time I use the Snippet.
I could make another Snippet that uses this:
$id = $modx->documentIdentifier;
Then I could nest the Snippet calls. But is there a better way to do this?
Thanks!