Or here:
http://wiki.modxcms.com/index.php/Snippets_Overview
Quote from: Everett at Jan 21, 2009, 09:23 PM
Based on the thread here: http://modxcms.com/forums/index.php/topic,32295.0/topicseen.html
I think we should add the information for how Snippets can fetch the information available in any tag, e.g.
$fmPath = $modx->config['filemanager_path'];
to either this page:
http://modxcms.com/api-quick-reference.html
or this one:
http://modxcms.com/modx-tags.html
It’d be invaluable to know how a Snippet can read template variables (built-in and custom) and how to read chunk content. Forgive me if this is posted elsewhere.
It didn’t seem to fit in the API quick reference, but I edited the modx-tags page to include information on getting system settings, page attributes (link to the document object page), and chunks from inside a snippet.
Feel free to add the same info to various places on the Wiki.
Quote from: Everett at Jan 22, 2009, 12:44 AM
Thanks Bob!
I wrote the http://wiki.modxcms.com/index.php/Snippets_Overview page, btw
Many thanks to you and others for pointing out errors!
I think this particular bit of info is probably more suited for the http://wiki.modxcms.com/index.php/Creating_Snippets
page, so I added it there.
I’ve tried to be the shepherd of the Wiki... otherwise I get lost with my short term memory.
That’s great. The Wiki needs all the help it can get. Much of the necessary information is there but using the Wiki search doesn’t always find it for you and navigating from page to page often takes you around in circles. If you can figure out how to make the information findable by people who aren’t sure where to look, it will be orders of magnitude more helpful for new users of MODx.
-
☆ A M B ☆
- 2,475 Posts
Oiy, yeah, the search feature for Wiki’s is horrible... it’s easy to lose articles. I always try to add a category for every page (or several categories), and then link to the page from somewhere so I can find it. The Snippets stuff will get an overhaul here as I work on another MODx video...