Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
Proper use of tags
Today, I read this FAQ about creating navigation. It suggests, among other things, to use this code in order to create a navigation list.
<code>
<ul>
<txp:section wraptag=“li” link=1 title=1 name=“about” />
<txp:section wraptag=“li” link=1 title=1 name=“articles” />
<txp:section wraptag=“li” link=1 title=1 name=“news” />
<txp:section wraptag=“li” link=1 title=1 name=“contact” />
</ul>
</code>
Now, perhaps I’m missing something obvious, but if I have to enter each section’s name as an attribute, why don’t I just code the navigation by hand? It’s hardly more work.
I’d appreciate anything that enlightens me on this since there are some more tags whose function I don’t understand because they contain nothing dynamic.
Offline
Re: Proper use of tags
this is what you need
<code><txp:section_list wraptag=“ul” break=“li” /></code> and <a href=“http://textpattern.net/wiki/index.php?title=Txp:section_list_/”>here</a> it is in the manual
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: Proper use of tags
Thanks colak, but I know how to achieve this effect.
It was just an example because I don’t understand why you would use, e.g., the tag <txp:section name="about" />
instead of just writing “about”.
Offline
Re: Proper use of tags
It’s not the only strange tag doing strange things :)
Offline
Re: Proper use of tags
I am grasping here but maybe if you wanted to change your section title in txp’s sections tab then it would dynamically update your navigation. Using section_list does not usually work for me because I often have a section that I don’t want outputed in my main navigation.
Refresh Dallas and other Refreshing Cities.
Offline
#6 2006-01-07 02:41:48
- zem
- Developer Emeritus
- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
Re: Proper use of tags
Now, perhaps I’m missing something obvious, but if I have to enter each section’s name as an attribute, why don’t I just code the navigation by hand? It’s hardly more work.
In case you change the name of a section, move your site, etc.
Alex
Offline
Re: Proper use of tags
Ok, I see. I had thought of that but wasn’t sure if there was some other advantage I didn’t realise. Thanks, zem.
Offline
Pages: 1