Hi,
i’m using Amrita to generate static website pages, and having fun with
it! Now I’d like to have a navigationlist, a list where the items are
urls; all fine, but I’d like to designate one particular list-item as
"active", which is defined as id selector in the css-stylesheet for
the pages.
So the generated html-code should look something like this:
However, I cannot find a way to have Amrita generate the value
"active" for the id attribute in a list-item. I did manage, as a
side-test, to use a css class instead of an id selector, and had it
generated by Amrita, but cannot get it working with the id-selector.
In my template, I set amrita_id to ‘amrita_id’.
So my question is, how to generate a ‘<<some_tag> id="<some_value>"
…>’ with Amrita?
Since the “id” attribute has a special meaning for Amrita itself, you
have to use a workaround. If you need to define id attributes (that is,
id attributes that are to be present in Amrita’s output), you can
insert an “id” attribute. During Amrita’s processing, all “id”
attributes are renamed to “id” attributes. Something like this should
do the trick:
Hi,
i’m using Amrita to generate static website pages, and having fun with
it! Now I’d like to have a navigationlist, a list where the items are
urls; all fine, but I’d like to designate one particular list-item as
“active”, which is defined as id selector in the css-stylesheet for
the pages.
So the generated html-code should look something like this:
However, I cannot find a way to have Amrita generate the value
“active” for the id attribute in a list-item. I did manage, as a
side-test, to use a css class instead of an id selector, and had it
generated by Amrita, but cannot get it working with the id-selector.
In my template, I set amrita_id to ‘amrita_id’.
So my question is, how to generate a ‘<<some_tag> id=“<some_value>”
…>’ with Amrita?
Date: 26 Jan 2004 09:33:48 -0800
From: Harry hvs1@chello.nl
Newsgroups: comp.lang.ruby
Subject: amrita-nuby question: generate “id=”
Hi,
i’m using Amrita to generate static website pages, and having fun with
it! Now I’d like to have a navigationlist, a list where the items are
urls; all fine, but I’d like to designate one particular list-item as
“active”, which is defined as id selector in the css-stylesheet for
the pages.
So the generated html-code should look something like this:
However, I cannot find a way to have Amrita generate the value
“active” for the id attribute in a list-item. I did manage, as a
side-test, to use a css class instead of an id selector, and had it
generated by Amrita, but cannot get it working with the id-selector.
In my template, I set amrita_id to ‘amrita_id’.
So my question is, how to generate a ‘<<some_tag> id=“<some_value>”
…>’ with Amrita?
thxia,
Harry
–
ATTN: please update your address books with address below!
The difference between art and science is that science is what we
understand well enough to explain to a computer.
Art is everything else.
– Donald Knuth, “Discover”
/bin/sh -c ‘for l in ruby perl;do $l -e “print "\x3a\x2d\x29\x0a"”;done’
===============================================================================