In the radiant wiki over on github (I am posting this here because the
wiki on github seems to have very low readership), the conditional
tags page show this example code:

<head>
<r:if_url matches="^/$">
  <title>Radiant Handbook</title>
</r:if_url>
<r:unless_url matches="^/$">
  <title><r:title/> - Radiant Handbook</title>
</r:unless_url>
</head>

The documentation goes on to say that "the code above would set the
page title as “Radiant Handbook” on the homepage, but for all subpages
it would use the title of the page, then “… – Radiant Handbook”.

Now, when I look at the url regexp in the first bit (if_url matches),
then I look at the regexp in the second bit (unless_url), these two
expressions look *exactly the same* to me. Each one is "^/$". Am I
blind, or are they the same? And if they are the same, should they be?
And if not, what should they be?

I am trying to show an "About Me" link (in an id that slides in and
out with JS) on my site on every page except the /about page (which
already is about me...). It seems that if_url and unless_url are the
way to go here, but I can't seem to get it to work. And I'm wondering
is the reason for that has to do with the example code I've been
adapting. I just changed the unless_url link to <r:unless_url
matches="^/about/$">, but no dice. The About Me link still shows on
that page.

So I suppose I have two questions: does the wiki have a typo, and how
do I get this if/unless pair to work in my situation?

Reply via email to