How to use regex with if_url tag!

<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.

Arik,

Nice tip! You can do some pretty powerful things with <r:if_url> and
regexps.

Sean

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs