[Radiant] quickest and least expensive way to retrieve URL segment
Sean Cribbs
seancribbs at gmail.com
Mon Apr 21 09:23:45 CDT 2008
The <r:if_url> and <r:unless_url> tags probably provide what you need.
Give the tags a 'matches' attribute that contains a regular expression.
Here's an example:
<r:if_url matches="^/en/"><r:content part="body_en" /></r:if_url>
That would output the "body_en" part if the beginning of the URL matches
/en/.
Sean
Ryan Irelan wrote:
> I would like to check a url segment (in this case whether the site is
> /en/ or /zh/) so I can display content based on language.
>
> In Radiant what is the quickest and least expensive way to do this?
>
> Thanks!
>
More information about the Radiant
mailing list