Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
Put <span> and id inside txp:section
Hi everyone,
I’m new to Textpattern but very excited about it.
I created my first navigation menu on the left of my page like this:
<ul id=“navlist”>
<txp:section wraptag=“li” link=1 title=1 name=“Home” />
<txp:section wraptag=“li” link=1 title=1 name=“Books” />
…
</ul>
I would need to apply a <span> tag in some of the items and an a different id to all of them. Here is a working html example:
<li><a href=”#” id=“books”><span class=“booksItalicIndent”>Books</span></a></li>
How do I apply the id and the span to the list items in Textpattern?
Thanks very much for your help.
otti
Offline
Offline
Re: Put <span> and id inside txp:section
Thanks Gocom,
That worked perfectly. But how about including the id as well? The id is to show the current page in this case.
Cheers
otti
Offline
Re: Put <span> and id inside txp:section
how about <a href="#" id="<txp:section />" /></a>
?
Offline
Re: Put <span> and id inside txp:section
Hi Sven,
That did not work. I got the span to work as per the previous answer, but I can’t work out the id with the current setup:
<li><txp:section name=“Home”>Home</txp:section></li>
Do I have to use href again? I used it before and had problems to link to the sections.
Any advice would be good.
Cheers
otti
Offline
#6 2008-05-02 10:43:17
- uli
- Moderator
- From: Cologne
- Registered: 2006-08-15
- Posts: 4,306
Re: Put <span> and id inside txp:section
Can this be what you’re aiming at?
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
Re: Put <span> and id inside txp:section
Hello Otti. If you can’t find an appropriate solution, give a look at the ako_nav plugin. I’m using it all the time for basic nav menu, and it’s also pretty configurable (lets you insert span or not, give class and id, use class=active for actual section, etc.).
Hope this help
Z-
Offline
Re: Put <span> and id inside txp:section
Thanks Zanza,
That solution should do the trick.
otti
Offline
Pages: 1