Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-03-05 12:10:49

daphna
Member
Registered: 2009-02-22
Posts: 18

order of sections

i managed to get my sections to be a horizontal navigation menu.

how do i control the order in which the sections appear ?
currently this is the code…:

———————
<div id=“nav-master”> <txp:section_list default_title=’<txp:text item=“home” />’ include_default=“1” wraptag=“ul” break=“li” break=” | “> <txp:if_section name=’<txp:section />’>&raquo;</txp:if_section> <txp:section link=“1” title=“1” /> <txp:if_section name=’<txp:section />’>

</txp:if_section> </txp:section_list>

</div>
___________

thanks

Offline

#2 2009-03-05 13:28:08

ndrwtrvrs
Member
From: London
Registered: 2008-04-03
Posts: 25
Website

Re: order of sections

Hi Daphna, I’d recommend cbs_navigation_menu as a really good way of doing this. Really easy to use.

Hope this helps
Andrew

Offline

#3 2009-03-05 13:38:59

antonhor
New Member
Registered: 2009-03-05
Posts: 7

Re: order of sections

hy i think you coul use something like this:

<txp:section_list include_default=“1” sections=“01_section,02_section,03_section “ break=“li” wraptag=“ul” sort=“name asc” /> give the numbers to the section names and sort them. After that you change the Section title so that the names in the links don’t appear with numbers.

hope that helps…

Offline

#4 2009-03-05 13:48:34

daphna
Member
Registered: 2009-02-22
Posts: 18

Re: order of sections

Cool Thx,

i ended up using antonhor’s method, cause after installing the cbs plugin i couldnt figure out how to wrap thing in an unordered list. it works just fine. thx.

Offline

#5 2009-03-05 16:27:26

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: order of sections

antonhor wrote:

<txp:section_list include_default="1" sections="01_section,02_section,03_section " break="li" wraptag="ul" sort="name asc" />

You don’t need to add numbers to your section names! If you use the section attribute like this:

sections="second-section,first-section,seventh-section,etcetera"

it will use that exact order.

Last edited by els (2009-03-05 16:29:30)

Offline

Board footer

Powered by FluxBB