Very nice little snippet !
Thanks for sharing.
regards,
zi
great useful snippet! thanks!
-
MODX Staff
- 12,272 Posts
Does it get the raw code or the parsed output?
Ryan Thrash, MODX Co-Founder
Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
Parsed output.
Sorry folks I copied and pasted the wrong version!
I updated the first post with the correct version!
Thanks Mark for this much needed snippet, I can think of a few uses for it
.: COO - Commerce Guys - Community Driven Innovation :.
MODx est l'outil id
Hmm... does it work fine without the modification I made? I just put in a quick hack, I didn’t do any security testing. It may be that the template variable you’re requesting has specific document permissions on it which would cause the getTemplateVar call to fail. I’d try taking a look at the "some documents" to find a pattern and see if you are requesting info from pages that have security on them.
Hope that helps.