I've got a question regarding conditional tags. There are two things I would like to do:

1. In my Normal layout I use the page title as h1 element (sometimes as a link, sometimes as just a heading). However, I wish _not_ to have a h1 title on the home page only. I am not sure how to achieve this.

On the wiki, I've seen an example:
<r:if_url matches="^/$">
which matches the home page -- just not sure how to use it

Currently in Normal Layout I have:
<r:unless_url matches="^/journal/.+">
      <h1><r:title /></h1>

 <r:if_url matches="^/journal/.+"><r:unless_url matches="-archives/$">
      <h1><r:link /></h1>
      <r:snippet name="posted" />

Furthermore, using the above, when I go to archives, I get all the posts' titles but not a general %Y Archives heading.

2. There are a few styles I would like to apply to a certain page -- but I don't want to create another layout just for one page. I would prefer to be able to add a class to the body element instead and to be able to be more specific in my css.
For example:
if page_id = some_number
    add class="some_class"


if page_title = some_title
  add class="some_class"

Could you suggest best practice to achieve the above?

Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

Reply via email to