Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2008-10-10 10:26:43
- TonyVT
- New Member
- Registered: 2008-10-03
- Posts: 5
How Do You Change the Order of the Sections?
Hello,
After creating sections, deleting, adding more sections, I find that I need to rearrange the order of the sections to correspond to the order of my navigational links. Other than deleting, then creating the sections in the order I want, I don’t see a way to simply rearrange the order in the Sections panel with the Admin interface.
http://www.tonyventura.com/tp/
Is there an easy way to accomplish this?
Thank you for any assistance.
Tony
Offline
Re: How Do You Change the Order of the Sections?
Nope.
Offline
#3 2008-10-10 12:51:05
- gomedia
- Plugin Author
- Registered: 2008-06-01
- Posts: 1,373
Re: How Do You Change the Order of the Sections?
My plugin adi_menu might help. It has a custom sort capability.
Offline
Re: How Do You Change the Order of the Sections?
gomedia -
That looks like a really handy plugin. At minimum, I think adding an extra “sort order” field to each section in the sections management tab should be added to a future release of textpattern.
Offline
#5 2008-10-10 21:31:42
- TonyVT
- New Member
- Registered: 2008-10-03
- Posts: 5
Re: How Do You Change the Order of the Sections?
I had a feeling the re-arranging of Sections was not going to be easy. I will check out the adi_menu plug-in.
Thank you,
Tony
Offline
Re: How Do You Change the Order of the Sections?
TonyVT said
I find that I need to rearrange the order of the sections to correspond to the order of my navigational links.
Tony,
Help me understand the requirement. Are you saying that the order your TXP sections appear in your navigation scheme absolutely must be reflected in the order that they appear in the Admin Interface. If so, why? I’m sure that you have an excellent reason for wishing it to be so, but I can’t see why it would matter.
Offline
#7 2008-10-11 01:28:08
- TonyVT
- New Member
- Registered: 2008-10-03
- Posts: 5
Re: How Do You Change the Order of the Sections?
Hi joebaich,
The order of my navigation button that are visible to the user are:
Home About Articles Contact Help “Original Songs”
The order of my sections that are listed top down in the Presentation | Sections tab panel are
Default About Articles Contact Help “Original Songs”
I misspoke when I said Admin interface.
In the Presentation | Sections tab panel, there is no way to change the order of the navigation links, so that I can have Contact and Help appearing as the last two links. So, I am simply trying to find a way, other than deleting and re-creating the sections in the final order that I want them to appear, to re-order the navigational links.
It seems that the order in which the sections appear in the Presentation | Sections tab panel reflects the order that is visible to the user.
Thank you for your reply,
Tony
Offline
Re: How Do You Change the Order of the Sections?
The sections in the “Sections” tab are sorted in alphabetical order with the exception of the default section which is always at the top. Deleting and re-creating them will not change their order so don’t go down that route. I don’t know of a way of changing the sort order short of hacking the TXP code.
I am curious as to why you want this.
Last edited by thebombsite (2008-10-11 09:01:44)
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
#9 2008-10-11 10:13:29
- TonyVT
- New Member
- Registered: 2008-10-03
- Posts: 5
Re: How Do You Change the Order of the Sections?
Hello thebombsite,
For some reason, I was not thinking the sections were in alphabetic order. Another non-observation on my part. Since they are, and the navigational buttons are also in alphabetical order, that changes how I can approach the naming and the subsequent ordering of the navigation buttons.
The ako_nav plug-in, by Adrian Kostrubiak, http://forum.textpattern.com/viewtopic.php?id=8522, solves the order problem in this manner:
<txp:ako_nav
name=“Home,Archives,Links,About,Contact”
url=”/,/?s=archives,/?s=links,/?s=about,/?s=contact”
headon=“0”
title=“Home,Archives,Links,About,Contact”
/>
Thank you for your reply,
Tony
Offline
Re: How Do You Change the Order of the Sections?
No problem and glad to see you found a solution, however you might want to take a look at the <txp:section_list /> tag which I think would achieve the same results without the need for a plug-in. You can specify which sections to include and their output order using the “sections” attribute.
Last edited by thebombsite (2008-10-11 10:47:51)
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
#11 2008-10-11 11:26:10
- TonyVT
- New Member
- Registered: 2008-10-03
- Posts: 5
Re: How Do You Change the Order of the Sections?
Great suggestion. At this point, I’ve been using Textpattern for less than a week. I know enough to be dangerous. Lesson learned here is to always look for the API to see what the framework offers. In this case, your suggestion of providing the desired values for the sections attribute of the <txp:section_list /> element makes sense.
Thank you for your help.
Tony
Offline