We launched new forums in March 2019—
join us there
.
In a hurry for help with your website?
Get Help Now!
Back to MODX.com
Forums
Docs
Revo Issues
Blog
My Forums
Products
Revo Discussions & Support
Revolution 2.0
Search
Getting page_id via Snippet
☆ A M B ☆
2,475 Posts
Everett
Reply #1,
15 years, 8 months ago
I’m pretty sure I asked this once before, but I can’t find it, so forgive the re-post.
What’s the programatic way to see the ID of the current page inside of a Snippet? I’m doing this:
$modx->documentIdentifier;
Is that legit? Thanks!
Hosting stuff:
http://fireproofsocks.com/
Coding stuff:
http://craftsmancoding.com/
Blog stuff:
http://tipsfor.us/
4,149 Posts
splittingred
Reply #2,
15 years, 8 months ago
Best way:
$modx->resource->get('id');
shaun mccormick
| bigcommerce mgr of software engineering, former modx co-architect
|
github
|
splittingred.com