So, I have this little piece of code:
{cover-{segment_2}}Where “cover-this” is the name of a snippet, and “this” is the value of segment 2 in the URL.
I was sort of surprised that it worked at all, but sometimes it works, and sometimes it doesn’t. The times that it doesn’t work are usually the first time I’m hitting the page after a break, so perhaps the segment variable gets cached and purged at some point?
Anyway, I guess my question is this: How can I call a snippet using information from the URL? Would it be better if this were a global variable?