Hi guys
On my home page I have a page part called menubar which uses the
following
snipet.
This displays the main navigation and works well. I only have one issue
with it. I would like to highlight to the user which section they are
currently in. The CSS has been setup so all I actually need to do is
something like this, by just using the class = “on”:-
Extranet
At the moment, I am thinking about having to create separate menubar
snippets for each section and using some kind of if statement. Is there
a
simple way to do what I need?
My next question relates to using snippets as global variables. I
wanted to
create a snippet called CompanyName. I wanted this snippet to use
textile
and simple be the company name e.g. Company Name. I figured that if
the
company named changed it would be child’s play to change it throughout
the
website.
The only problem is that when I call the snippet it adds a line break
which
is no good as it would be typically put into regular paragraphs. Is
there
anyway to achieve global variables for a website?
Thanks in advance
Harvey
This e-mail has been scanned for all viruses by MessageLabs.
Harvey B. wrote:
This displays the main navigation and works well. I only have one issue
with it. I would like to highlight to the user which section they are
currently in. The CSS has been setup so all I actually need to do is
something like this, by just using the class = “on”:-
Extranet
There seem to be two approaches to this. The first is to use the
<r:navigation /> tag as described in part 2 of the Tag Primer:
http://radiantcms.org/blog/2006/06/15/tag-primer-2/
The second is to use slugs in combination with id elements as Randy
Heneise covers in his article on Radiant:
http://artofmission.com/articles/2006/06/06/radiant-cms
My next question relates to using snippets as global variables. I wanted to
create a snippet called CompanyName. I wanted this snippet to use textile
and simple be the company name e.g. Company Name. I figured that if the
company named changed it would be child’s play to change it throughout the
website.
The only problem is that when I call the snippet it adds a line break which
is no good as it would be typically put into regular paragraphs. Is there
anyway to achieve global variables for a website?
Not at the moment. The best you can probably do is to use a snippet
without a filter applied to it. Textile and Markdown both put paragraph
tags around content that appears on a line by itself.
–
John L.
http://wiseheartdesign.com