I’m about to attempt to write my first snippet because I need to have a small slideshow on a page that’s dynamically populated with whatever images are in a specified directory. I created a snippet and called it ProjectImages. In an attempt to make sure I understood how the data would be output, the only code I put in it is return "testing"; I then placed the snippet call in my template like so: [!ProjectImages!] I expected to see the text "testing" on the page but instead the template just outputs the snippet call verbatim. What am I doing wrong?
Dave
Did you use
or
The first example will not generate any output on the screen.
Interesting. Changing the snippet call from [! !] to [[ ]] did the trick. Does that have something to do with the fact that the snippet is being called from within a chunk being used by a call to Ditto that’s already wrapped in [! !]?
Yes, when nesting snippets (even "indirectly" via chunk), use alternate cache syntax.
I’ll remember that. Thanks!