[Radiant] How to use regex with if_url tag!
Sean Cribbs
seancribbs at gmail.com
Sun May 4 10:23:22 CDT 2008
Arik,
Nice tip! You can do some pretty powerful things with <r:if_url> and
regexps.
Sean
Arik Jones wrote:
> <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.
>
More information about the Radiant
mailing list