Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2008-03-16 20:50:28
- lister
- Member
- Registered: 2008-02-13
- Posts: 76
simple navigation??
Hello everyone, Im learning textpattern and working on updating a site here is the link (static site):
http://www.precociouscollective.com/index.html
as you can see there is a simple navigation
Home | Artists | Exhibitions
I have created x3 sections called the above. i have installed the plugin:
cbs_navigation_menu
I have created a form called “header+nav” this form contained my current
html navigation
This then got replaced by the plugin syntax:
<div id=“header”>
<txp:cbs_navigation_menu
sections=“home,artist,exhibitions”
titles=“Home,Artist,Exhibitions”
break=“li” <———————————not sure what to put here?
activeclass=”??” <———————————not sure what to put here?
wraptag=“ul” <———————————not sure what to put here?
ids=”??” /> <———————————not sure what to put here?
</div>
The style being used is the “#header li” which at the moment to controlling the navigation
I have been reading the text file but Im not sure how
to assign the “#header li” class to work with the plugin.
im really sorry if this is an obvious question, Ive just started learning Textpattern
Thanks
rob
Offline
Re: simple navigation??
You don’t need a plugin – use section_list.
break
is the HTML that separates menu itemswraptag
is the HTML containeractiveclass
applies a class attribute to thea
element if you’re on that section. So if you’re on /exhibitions, the exhibitions-link will have a class applied to it.
Example:
Template:
<div id="header">
<txp:section_list active_class="my_active_class" break="li" class="" default_title="Home" include_default="1" wraptag="ul"/>
</div><!--//header-->
HTML output:
<div id="header">
<ul> <!-- == wraptag -->
<li><!-- == break -->
<a class="my_active_class" href="URI">
Home <!-- == default_title -->
</a>
</li>
<li> <!-- == break -->
<a href="URI">
Artists <!-- == section name -->
</a>
</li>
<li><a href="URI">Exhibitions</a></li>
</ul>
</div><!--//header-->
CSS:
#header li a.my_active_class {
font-weight: bold;
}
Bookmark the TextBook ;).
Offline
#3 2008-03-16 22:27:59
- lister
- Member
- Registered: 2008-02-13
- Posts: 76
Re: simple navigation??
Thanks alot for that! Ive been following the textpattern solution book, maybe a bit to closely.
Thanks, that worked a treat..
Offline
Pages: 1