Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Categories per section
Just started to play with categories, had never used them before for display purposes, just back end organization.
What I’d like is for the txp:category_list to just display the categories I use in that particular section. I’ve almost figured a mechanism using parent categories and using parent=“bert” in the category list but it proves to be erratic, working sometimes and then failing. Went through the forum looking for answers but I didn’t turn up anything conclusive and some threads were a bit old and wondered if the advice would still apply to today.
Also, the category links on the side menu, when they do work, aren’t using the section name for the url’s, so they redirect to the front page – even though the article category links do work within sections.
How do I walk on the rice paper?
We Love TXP . TXP Themes . TXP Tags . TXP Planet . TXP Make
Offline
#2 2007-03-27 01:53:07
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Categories per section
Textpattern sees categories as global, crossing all sections. If you want to change that, you need to use a plugin; there are a couple listed on the resources site.
If you want the built-in tag to link to a specific section, use the appropriate attribute (listed in TextBook).
Offline
Re: Categories per section
Yes, I know there are plugins, I’m just trying to understand how the core works.
I’ve only been using Textpattern for the last year and wasn’t around for the early days, so were sections like an after thought? I view a section like it’s own unique entity, it’s own articles, categories, etc. Not being able to distinguish categories per section seems a bit odd to me.
A quick hack would be to use the Category parent drop down field to display the sections, thus being able to associate a Category to a section.
We Love TXP . TXP Themes . TXP Tags . TXP Planet . TXP Make
Offline
#4 2007-03-27 05:30:46
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Categories per section
I don’t know whether categories or sections were first (perhaps they were created at the same time). I’ve been around since ’04, when it was just Dean, and both already existed then.
Offline
Re: Categories per section
>Bert
I find the independence of categories from sections incredibly useful. Imagine the following scenario.
On a wine site, we categorize wine articles by varietal (cat1) and vintage (cat2) it’ll always be wine that’s a content taxonomy.
But we want to present those wines in different contexts, reviews, spec sheets, store specials, even events (release events). These are presentation taxonomies or divisions.
I love having those divisions working at cross purposes, in fact I think it adds to, rather than detracts from, flexibility.
Just my 2c.
>mary
Nice rev.
Offline
Re: Categories per section
Mary, is there a download museum of Textpattern releases?
mrdale, I can see how the current category scheme works, I printed out the MySQL table and understood it much better, wish we had a data dictionary somewhere. Where the scheme works on some sites, it’s a bit awkward on others, depends on the situation.
What I’m having problems with is trying to list on the side menu, the categories that pertain to a section. I’ve tried the parameters in txp:category_list to no avail, section=”“ and this_section=”“. I must be doing something wrong somewhere and after many hours messing around with it, I came here to see how other people were doing it.
We Love TXP . TXP Themes . TXP Tags . TXP Planet . TXP Make
Offline
Re: Categories per section
>Bert
The way I’ve got around the limitation of no subsections and no section-specific categories is like this…
- Create parent categories with names identical to the sections.
- Create section-specific child categories under these
- Use stw_category_tree which has a wealth of flexibility to produce nested unordered category lists.
- You can even add wondertag to the mix to exclude/include attributes based on the current section.
Now I’m up to 4c
BTW: SVN is your friend
Last edited by mrdale (2007-03-27 17:13:45)
Offline
Re: Categories per section
mrdale wrote:
- Create parent categories with names identical to the sections.
- Create section-specific child categories under these
That’s exactly what I came up with also, it was just failing on a certain section, couldn’t figure out why. Also the side menu category links weren’t using the section in the generated url.
The site is using: Textpattern version: 4.0.4 (r2254)
We Love TXP . TXP Themes . TXP Tags . TXP Planet . TXP Make
Offline
#9 2007-03-27 21:40:32
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Categories per section
hcgtv wrote:
Also the side menu category links weren’t using the section in the generated url.
You can achieve that with gbp_permanent_links.
Offline
Re: Categories per section
I use cbs_category_list . It’s section aware, and super easy to setup. Works like a charm.
Last edited by hakjoon (2007-03-27 23:26:31)
Shoving is the answer – pusher robot
Offline
Re: Categories per section
Basically, section are the arborescence (tree) of a website (well, there aren’t any subsections right now, but that’s another story). You you can sort out stuff like you would in a cabinet, one article in one section.
Categories are cross-site. They are in fact like label, or tag. You can “tag” an article with one or two categories, and then display everything that has been tag with a specific category, regardless of sections.
Of course, there is no – in core – mechanism to handle childhood of categories on the frontend, or to have cross-resources categories, or to limit a category to a section but that will come one day, one way or the other.
And of course, since there’s no subsection, people are usually using category to fake that.
Check the forums, there are hundreds and hundreds (literally) of posts on that topic.
Last edited by Jeremie (2007-03-27 23:54:06)
Offline
Re: Categories per section
Els, hakjoon and Jeremie,
I can see that I’ll need a plugin to do what I desire for my site. And yes, I’ve spent hours looking at all the forum posts.
What I don’t understand is this, if a feature is requested so many times and a particular plugin becomes such an indispensable part of a person’s website, shouldn’t the core adjust to this?
We Love TXP . TXP Themes . TXP Tags . TXP Planet . TXP Make
Offline