Hello,
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="^/$">
....
</r:unless_url>
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:unless_url>
<r:if_url matches="^/journal/.+"><r:unless_url matches="-archives/$">
<h1><r:link /></h1>
<r:snippet name="posted" />
</r:unless_url></r:if_url>
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"
end
or
if page_title = some_title
add class="some_class"
end
Could you suggest best practice to achieve the above?
Thanks,
Elle
_______________________________________________
Radiant mailing list
Post: [email protected]
Search: http://radiantcms.org/mailing-list/search/
Site: http://lists.radiantcms.org/mailman/listinfo/radiant