Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#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

<div id=“header”> <ul> <li><a href=“index.html”>Home</a></li> <li>|</li> <li><a href=“artists.html”>Artists</a></li> <li>|</li> <li><a href=“exhibitions.html”>Exhibitions</a></li> </ul> </div>

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

#2 2008-03-16 21:21:45

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Re: simple navigation??

You don’t need a plugin – use section_list.

  • break is the HTML that separates menu items
  • wraptag is the HTML container
  • activeclass applies a class attribute to the a 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

Board footer

Powered by FluxBB