[Radiant] How to use regex with if_url tag!
Arik Jones
makingme at gmail.com
Sun May 4 07:53:08 CDT 2008
<r:if_url matches="^.*\b(podcast|podcasts|audio|media)\b.*$">
### some reference to an audio file here ###
</r:if_url>
Essentially what the regular expression above does is show the content
only if the url contains any of the following words. So in the example
if I'm running a podcast (using page_attachments to upload audio files)
I can show the audio url ONLY within the context of the url keywords
described in the regexp and you can add as many keywords as you'd like.
--
Posted via http://www.ruby-forum.com/.
More information about the Radiant
mailing list