Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2010-12-28 09:19:37

wornout
Member
From: Italy
Registered: 2009-01-20
Posts: 256
Website

[request] Article category description field

I often use article categories to simulate a second level of navigation.
So, when I view a section front page, list of categories appears most usually only with their titles.
But sometimes I need to add a little description to each category. In this case I use a custom field then with an article custom tag I put it where I want.
This isn’t very simple to explain to clients and I think that the right solution is to add a description field to each category, so I can add it directly in content section and I can extract when I need it.

Same concept for a category image!

What do you think?

Last edited by wornout (2010-12-28 09:52:37)

Offline

#2 2010-12-28 09:46:53

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,726
Website

Re: [request] Article category description field

One way would be to use rah_output_section_form with the attribute type="category" and then create separate forms for each category description (disadvantage, not editable by the client). You could do the same with <txp:output_form form='catdesc_<txp:category />' /> but rah_output_section provides a fallback for when no form exists. If you need a user-editable version of the category description, you should be able to use the same principle using txp:variable and adi_variables (which are author-editable).

A similar idea came up in connection with esq_sectionsort. I adapted the plugin to add a categorysort attribute (currently still with the plugin author for rolling into the original plugin) but with some further slight modifications the same concept could easily be used for creating custom fields of other kinds for sections and categories. The idea is with the plugin author.

Same concept for an category image!

Try upm_category_image


TXP Builders – finely-crafted code, design and txp

Offline

#3 2011-01-03 09:13:13

wornout
Member
From: Italy
Registered: 2009-01-20
Posts: 256
Website

Re: [request] Article category description field

A category description field will help developing and maintaining a multi-lingual site, too! Even the administrator isn’t expert…

Offline

#4 2011-01-03 12:05:29

Zanza
Plugin Author
Registered: 2005-08-18
Posts: 699
Website

Re: [request] Article category description field

Couldn’t sticky articles (either belonging to that section/category or assigned to “description” section plus category) be a viable options? I agree it’s far from ideal, but those would be editable by clients. With related_articles and a bunch of conditional tags you could easily display them as needed.

Anyway, as Jakob suggested, I solved with upm_category_image for a client site: it works fine and it’s easy to understand. Even easier than articles. You can use the image’s caption field for the description.

Offline

#5 2011-01-03 12:55:39

wornout
Member
From: Italy
Registered: 2009-01-20
Posts: 256
Website

Re: [request] Article category description field

Yes, I’ve used sticky articles for this purposes sometimes. Of course this solution will help in many cases! But what I’m thinking about this is a new way to simplify as much as is possibile the work for site administrators. Is more logical insert a description when i create a category, not in a sticky article field.

Last edited by wornout (2011-01-03 13:41:11)

Offline

Board footer

Powered by FluxBB