-
☆ A M B ☆
- 24,524 Posts
A tip for developing static snippets.
During development, it's best to call the snippet uncached, since otherwise you'll have to clear the cache every time you edit the external snippet file. Once the snippet is finished, change the snippet call to cached (if you want it cached) and clear the site cache.
As far as I can tell, this option makes the "include" snippet as mentioned here obsolete.
http://rtfm.modx.com/display/revolution20/Snippets#Snippets-WriteyourSnippetsoutsideofMODx.
http://rtfm.modx.com/display/revolution20/Developing+an+Extra+in+MODX+Revolution#DevelopinganExtrainMODXRevolution-TheincludeSnippet
Isn't one idea of using an include that you can then store it on something like git hub while developing a plugin thus making collaboration and version control easier?
-
☆ A M B ☆
- 24,524 Posts
A static snippet does exactly the same thing. I'm using one for the Doodles tutorial instead of the include snippet. When you check the "static" checkbox you get the option of using a Media Source (and selecting the file from the drop-down select) or none; if you use none you have to manually enter the absolute path to the snippet file.
Perhaps I should mention that this is using Revo 2.2. 2.1 may not have these.
Ah, I see, I've not come across static snippets yet.
Thanks for the tip.
Mike
-
☆ A M B ☆
- 24,524 Posts
I know documentation for 2.2 is still a bit sparse, to say the least, so I thought I'd just post any interesting tidbits I ran across as I learn how to use this beast.
I found good for myself to turn all modx caching off on my dev modx. SO when I modify snipets, chunks, etc. I don't need to clearing cache. This helps me a lot when I making lexicons for my cmp, because before this change I have to clear cache after any change in lexicon's files.
--
John
@theboxer