Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-04-02 14:20:07

daveJay
New Member
From: Eastern Tennessee - USA
Registered: 2008-04-02
Posts: 9
Website

Sorting Sections

I noticed on the wiki that you can sort sections by several different values.

http://textbook.textpattern.net/wiki/index.php?title=Txp:section_list_/

Mainly by name, page or css.

I don’t understand what these mean though and I can’t find it documented anywhere.

How can you sort by CSS? All I want to do is organize the section tabs on the top of the site in the order that I choose. Right now I have it set to sort by “name” and it’s sorting them in the order that I created the sections, but now I want to create a new section and move it to the first slot, but I can’t seem to do that anywhere.

Any help would be appreciated. Thanks!

Offline

#2 2008-04-02 14:29:59

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,726
Website

Re: Sorting Sections

I’d never noticed that. Must be new because it’s not in “textpattern solutions”.

The sort criteria reflect the settings on the presentation > section tab. Presumably this gives you a way of grouping how they appear, e.g. those that use a common css stylesheet or page template.

Use the sections="comma,separated,list,in,my,order" attribute to order the menu how you’d like it:

sections="section name(s)"
Comma-separated list of section names to include in the list, displayed in specified order (unless overriden with sort attribute). Default is unset, leading to an unrestricted list of all sections.

Last edited by jakob (2008-04-02 14:33:18)


TXP Builders – finely-crafted code, design and txp

Offline

#3 2008-04-02 14:38:10

daveJay
New Member
From: Eastern Tennessee - USA
Registered: 2008-04-02
Posts: 9
Website

Re: Sorting Sections

ooooh, I see. So it’s basically applying an order_by to the SQL query, and the acceptable values or simply columns of the Section table.

So it looks like the only way to order them by my specifications is to either delete all of them and recreate them in the order that I want them… OR I can precede the section name with a number. Darn, that sucks. They need to add a sort_order field to the sections.

Nevermind I guess I should have finished reading your post =)

Last edited by daveJay (2008-04-02 14:40:44)

Offline

Board footer

Powered by FluxBB