Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-11-17 21:44:11

gavnosis
Member
From: Milton Keynes, UK
Registered: 2005-03-12
Posts: 151
Website

sub-section question (again)

The sub-section question has finally come to say ‘hello’ to me too – always off the pulse! -

Okay, I know this debate has gone on for a few years now, and I really hope I’ve just missed something simple.

I’ve read the previous forum debates and also the bucket discussion

However, in my endeavour to build a parish council site I think I have a need for subsections. (Is this blasphemous in The Textpattern debates?)

E.g The contents are arranged in these Sections

  • Home
  • Business
  • Contact
  • Education
  • News and Events
  • Parish Council
  • Recreation

Within say ‘Recreation’ I have several different sub sections:

  • Cricket
  • Football
  • Bowls

If I was building a static site using a HTML editor I would naturally arrange stuff in folders like this:

mysite/Recreation/Cricket/a-cricket-page

I can’t see an obvious way to achieve this in Textpattern. At the moment a less-satisfactory thing seems to be to add this extra level of organisation using Categories

Would an alternative be to have more sections, and just not use all of these for the main site navigation?
Or is categories the way to go? (In which case it looks like the zoo_section_and_category_list is something I need to make friends with…

Once again, any help would be gratefully received.

Gavnosis

Offline

#2 2008-11-17 22:15:09

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

Re: sub-section question (again)

I wonder why using categories is less-satisfactory to you. It’s fairly easy to implement, and you can have /section/category/article URLs with gbp_permanent_links. You might also want to contact ruud about his modification of zoo_section_and_category_list.

Offline

#3 2008-11-17 22:42:25

gavnosis
Member
From: Milton Keynes, UK
Registered: 2005-03-12
Posts: 151
Website

Re: sub-section question (again)

I guess I was worried that I was making a fundamental gaffe… but if you think that this is the way to organise content then I’m already reassured, and have already had a go with a version of the plugin I found (not the $50 version!)

Already I’m seeing the light with streamlined code like this

<txp:zoo_section_and_category_list wraptag="span" include_default="0" showall="0" sections="recreation" />

rather than the garbage I was writing previously ;-)

<txp:if_section name="recreation">
<h3>This Section</h3>
<ul>
<txp:category_list break="li" section="recreation" categories="bowls, cricket, wi" />
</ul>
</txp:if_section>
<txp:if_section name="education">
<h3>This Section</h3>
<ul> % <txp:category_list break=“li” section=“education” categories=“nursery, preschool, school” /> %
</ul>
</txp:if_section>

so, thank you for having a look at this for me, and the section > category > article is fine if that’s what I’m meant to do (And perhaps you can understand why my first attempt was making me nervous…)

My cherry-on-the-top will be to fit a <txp:section /> so that I can use a generic menu on pages in different sections

Last edited by gavnosis (2008-11-17 22:47:16)

Offline

#4 2008-11-17 23:04:03

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

Re: sub-section question (again)

if you think that this is the way to organise content

I don’t know if it is the way, but that’s how I’d do it (and have done so several times) :)

My cherry-on-the-top will be to fit a <txp:section /> so that I can use a generic menu on pages in different sections

If you create parent categories with the same name as the section the child categories belong to, you can do something like this:

<txp:if_section name='<txp:section />'>
<h3><txp:section title="1" /></h3>
<ul>
<txp:category_list break="li" section='<txp:section />' parent='<txp:section />' exclude='<txp:section />' />
</ul>
</txp:if_section>

This will be possible in 4.0.7, until then you can use asy_wondertag to use tags as attributes.

Last edited by els (2008-11-17 23:04:57)

Offline

#5 2008-11-17 23:12:11

gavnosis
Member
From: Milton Keynes, UK
Registered: 2005-03-12
Posts: 151
Website

Re: sub-section question (again)

Right, I’ll give it a go… and I’ll sleep better at night just knowing there will be a 4.07 (I’ve been getting nervous, and even looking at terrible things like Wordpress… just in case).

Anyway, I’ve just got a copy of asy_wondertag, so I’ll see what I can do!

Bedankt ,

Gavnosis

Offline

#6 2008-11-18 00:03:56

graeme
Plugin Author
Registered: 2004-06-21
Posts: 337
Website

Re: sub-section question (again)

Sub-sections with clean URLs through gbp_permanent_links will get a lot easier soon. Promise.

Offline

#7 2008-11-18 05:26:33

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

Re: sub-section question (again)

graeme from cardiff is a big tease.

Offline

#8 2008-11-18 07:41:43

gavnosis
Member
From: Milton Keynes, UK
Registered: 2005-03-12
Posts: 151
Website

Re: sub-section question (again)

Mr Dale,

I’ve just noticed that your site has the very thing I’m trying to achieve with this plugin medley, the site>section>subsection(aka category) structure
E.g. chapmancordova.com/work/Publications

I take it you’ve achieved this with some some alchemy involving Graeme’s gbp_permanent_links?

Offline

#9 2008-11-19 18:08:48

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

Re: sub-section question (again)

gavnosis wrote:

Mr Dale,
E.g. chapmancordova.com/work/Publications I take it you’ve achieved this with some some alchemy involving Graeme’s gbp_permanent_links?

Actually. This is the ONLY reason I have not been using graeme’s plugin. Image category support.

I use the venerable but touchy sgb_url_handler which you can wrangle into doing what you’re after.

Offline

Board footer

Powered by FluxBB