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
Add-ons
Creating & Repurposing Content
Ditto
Search
Placeholder to variable
72 Posts
Andrey_V
Reply #1,
17 years, 8 months ago
How can I get total number of pages from placeholder [+totalPages+] to some variable - $pt for example?
2,542 Posts
heliotrope
Reply #2,
17 years, 8 months ago
Hi,
for instance, your code has to be in a snippet called after the ditto snippet call in the document flow.
[[Ditto]]
[[MySnippet]]
Then you can use the Modx API
$v = $modx->getPlaceholder("the_ph_name_given_by_ditto");
Hope that helps
:-)
Made with MODx : [url=
http://www.copadel.com
]copadel, fruits et l
72 Posts
Andrey_V
Reply #3,
17 years, 8 months ago
thank you!