Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2012-01-06 17:02:19

jdueck
Plugin Author
From: Minneapolis, MN
Registered: 2004-02-27
Posts: 147
Website

Custom taxonomies

(Continuing the discussion from here – since this is about much more than “static pages” now)

What are good ways of doing custom taxonomies in Textpattern, whether under the current code-base or some future framework?

What I’m talking about when I say taxonomy: Check out the taxonomies on ftrain.com, which is published using an extremely custom codebase. Also check out this article on custom taxonomies in WordPress.

I define a taxonomy in this context as: a multi-level hierarchy where each node has an equal ability to contain and present structured information.

  • There is no fundamental difference between a “parent” or “container” node and its children. Any node can specify any other node as its parent.

Textpattern’s current limitations: A true taxonomy framework would be a huge improvement on what we currently have: Categories. Textpattern’s idea of categories is simply a label you slap on an article. This label may or may not be part of a hierarchical list. A Txp category can contain no information except its own name. It’s basically the same as a tag, except you can’t make them up on-the-fly like you can with tags.

A possible way forward: Ideally, I would like to see four steps taken in Textpattern development:

  1. Allow “articles” to specify other articles as parents. “Articles” can now take on the role of categories too.
  2. On the admin-side – specifically the Content tab – present “articles” in a hierarchical, expandable/collapsible tree-style list rather than as one giant soup-flat list the way they are now
  3. Introduce the common concept of tags as an explicit feature in the core codebase (remove or rename the ambiguous “keywords”)
  4. Completely eliminate the current system of Categories. All of this functionality would now be available with either tags or the newly-nestable articles, so allowing it to remain would only promote confusion.

I know this is may not be very pragmatic; it would break pretty much every Textpattern design out there including mine. But I think it is one very good direction to go if you accept that the current semantic framework has serious limitations. If we bolt something on to the side of the framework rather than just rebooting it, we may end up with something very, very confusing in the name of backwards-compatibility, and I am more afraid of that than I am of making everyone start over with a cleaner framework.

Offline

#2 2012-01-07 00:12:16

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

Re: Custom taxonomies

I enjoyed this discussion some time back when it was called xPattern.

I favor a more sweeping change to content types that would allow a content’s hierarchy to be flat (ie people) or nested (ie companies > departments > directors > people)

Offline

#3 2012-02-27 21:24:33

jdueck
Plugin Author
From: Minneapolis, MN
Registered: 2004-02-27
Posts: 147
Website

Re: Custom taxonomies

TXPmag is out again and it has its own custom taxonomy: Issues -> Columns. Each “issue” has its own little block content and a list of “columns” contained within it. I’d be interested in a look at how they chose to implement this architecture.

Offline

#4 2012-02-27 23:24:27

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

Re: Custom taxonomies

Yeah, I tackled this type of situation in order to do postmaster based email digests. There’s no super clean way of presenting the most recent “issue” but I got it to work via a date lookup going back into the article_custom call.

Offline

#5 2012-02-28 01:02:34

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,448
Website GitHub

Re: Custom taxonomies

I’m keeping quiet for now until I get round to publishing an article explaining it all, but I can assure you TXP’s implementation is a deceptively simple technique based around smoke, mirrors and some core tag magic :-)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

Board footer

Powered by FluxBB