Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-01-14 02:30:05

rahul
New Member
Registered: 2006-01-04
Posts: 9

Sections, Sub-Sections?

Dear All:

I’m trying to make a site, which has a three-level hierachy – like so:

x-Home
xx-About
xxx-A Day at CFL
xxx-Getting Here
xx-Education
xx-Funding

[—more stuff—]

My questions is – how do I configure it, so that the About section, can have sub-sections within it? Is it even possible? Why would I want to do it this way?

1. Breadcrumbs
2. Manageability
3. General…neatness :-P

My current site, is here. (Pls. note – it’s table-built – along with converting to TXP, I’m also moving to xHTML/CSS).

http://cfledu.org/

Thanks in advance,
Rahul.

Offline

#2 2006-01-14 04:23:29

nardo
Member
From: tuvalahiti
Registered: 2004-04-22
Posts: 743

Re: Sections, Sub-Sections?

from your example, it looks like you might only need two levels, if “Home”, “Education” and “Funding” are all top level sections (what you’d put on a navigation bar at the top of each page, for example)

in Textpattern your ‘home’ page is a special type of ‘section’ – and other sections don’t have to be nested within it

anyway, you have two options -

  1. use categories for “A Day at CDL”, “Getting Here”, etc – and post one or multiple articles within that category with the caveat that currently it can be a little tricky generating nav lists from categories, if you need a high level of control
  2. make “A Day at CDL”, “Getting Here”, etc each an article within section “About” – see this post and this one

a good way of working through these issues is to get Txp working on localhost on your computer – set up two Txp sites (to test the approaches above), add a bit of content, and try to get the architecture and functionality you want without worrying about the styling/design

another recommendation is not to let the wealth of plugins blind you from the built-in tags – usually you can achieve most of what you want with the core Txp code, with a handful of plugins to handle specific tasks (like nav lists, sometimes)

Offline

#3 2006-01-14 04:32:30

nardo
Member
From: tuvalahiti
Registered: 2004-04-22
Posts: 743

Re: Sections, Sub-Sections?

I just had a look at your site, rahul – option 2 would probably be your best bet

and to outline in plain english how textpattern would do it:

  • you’ll write articles (e.g. “Getting Here”) which will be in a section (e.g. “About”)
  • when you’re in a section home page, you’ll ask Txp to only output “sticky articles” onto that page, plus a list (sub nav) of all other “live” articles in that section
  • when you click an item on the sub nav, you’ll be going to an individual article page

easier to do it, than to write it out!

Offline

#4 2006-01-14 05:21:18

blumie607
Member
Registered: 2004-03-08
Posts: 175
Website

Re: Sections, Sub-Sections?

For site with more articles, though, sub-sections would be a great feature. Hopefully we see them soon…


bludrop studios .::. Creative Expression

Offline

#5 2006-01-14 12:28:27

goncalo.dumas
Member
From: Lisbon
Registered: 2005-12-14
Posts: 97
Website

Re: Sections, Sub-Sections?

nardo wrote:
(…) another recommendation is not to let the wealth of plugins blind you from the built-in tags (…)

Maybe I’m getting out of the original context of this post, but I couldn’t help noticing that this was one of my early problems in textpattern: How to organize articles within a section.

I think there is no need for theorical explanation, I think we all understand this taxonomy (erh), but the practical approach is not that clear.

I’ve filled this gat using one nice pluging called mdp_sectionmenu (http://outoverthevoid.com/projects/11/section-menu) witch gives us a good grip on the issue.

But I was left thinking: How do I manage this section/article thing without using a plugin… just by using plain textpattern tags.

Offline

#6 2006-01-14 14:26:31

nardo
Member
From: tuvalahiti
Registered: 2004-04-22
Posts: 743

Re: Sections, Sub-Sections?

you have sticky and live articles to play with, as well as a lot of options in the sortby attribute – making section-level menus is more restrictive unless you use plugins… because it’s rare you want to sort sections alphabetically (ako_nav makes hand-coded section menus easy)

Offline

#7 2006-01-14 19:29:20

goncalo.dumas
Member
From: Lisbon
Registered: 2005-12-14
Posts: 97
Website

Re: Sections, Sub-Sections?

In the meantime I deactivated the mdp_sectionmenu and hand coded some simple <code><a></code> tags on the sidebar that would replace (I thought) the plugin’s functions… but it worked! :o|

What are the pros and cons of doing such a thing?

Basically, I copied what was in documentation page of the ako_nav plugin (http://www.ako-k.com/archive/108)… witch it goes like this:

<code><div>
<h2>Navigation</h2>
<ul>
<li><a href=”/”>home</a></li>
<li><a href=”/about”>about</a></li>
<li><a href=”/contact”>contact</a></li>
</ul>
</div></code>

Last edited by patchwork (2006-01-14 19:30:47)

Offline

#8 2006-01-14 23:59:45

nardo
Member
From: tuvalahiti
Registered: 2004-04-22
Posts: 743

Re: Sections, Sub-Sections?

ako_nav gives you an ‘active’ class on the currently browsed section – handy

see this weblog post – hand-coded but with certain benefits (e.g. should you change your permanent link scheme, or the human-readable title of a section)

often your sections don’t change much, so the hand-tailored approach is sustainable – it’s different if you want to be able to add sections regularly (or over time) and have your navigation menus update automatically; maybe you have lots of sections (for product categories etc)

Offline

#9 2006-01-18 23:01:19

goncalo.dumas
Member
From: Lisbon
Registered: 2005-12-14
Posts: 97
Website

Re: Sections, Sub-Sections?

As I went copying the textpattern tags from the Textbook’s Alphabetical Tag Listing, I noticed the Txp:output form / ability to output… you guessed it, a form.

So, in order to centralize my menu’s links, I created a form named something_menu that holds all the HTML/textile and in each section page I just have to add the tag <code><txp:output_form form=“something_menu” /></code>

Offline

Board footer

Powered by FluxBB