Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#16 2007-03-28 15:19:43
- guiguibonbon
- Member
- Registered: 2006-02-20
- Posts: 296
Re: couple of suggestions on categories
yeah, absolutely. And link="1" is mandatory. He understands it’s a link you want as soon as you use it as a container tag.
EDIT: oops, I meant is not mandatory, of course.
Last edited by guiguibonbon (2007-04-02 09:36:45)
Offline
#17 2007-03-30 13:10:36
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: couple of suggestions on categories
In the mean time, here’s the corrected code…
Thanks for pointing that out. I’ll commit a patch for section, category, category1 and category2 shortly.
Promised, I’ll learn how to submit patches.
It’s really easy, particularly if you use a GUI, such as TortoiseSVN.
Offline
#18 2007-04-01 15:50:29
- guiguibonbon
- Member
- Registered: 2006-02-20
- Posts: 296
Re: couple of suggestions on categories
Thanks again Mary (r2264).
Problem with svn is I tend to hack a lot, which would, if i get the system right, bring alot of spam in with the patch.
Last edited by guiguibonbon (2007-04-01 15:50:50)
Offline
Re: couple of suggestions on categories
guiguibonbon wrote:
- an option should be set to treat articles whose categories have a parent category as if they were in that category (e.g. on the parent’s category listpage, articles with any of the child categories should also be displayed). The basic functions have already been written by Coke Harrington (chh_category_sql function in his article library)
I second this option, as I’d like to have it implemented when using a related_article list. At the moment, the related_article looks only for exact category, but I feel it should be take into account also the parent cat, even if with a minor weight than exact match, I suppose.
Any thought on this? Does it make sense?
Thank
Z-
Offline
#20 2007-04-02 09:30:12
- guiguibonbon
- Member
- Registered: 2006-02-20
- Posts: 296
Re: couple of suggestions on categories
Z, I totally agree. Of course, all the chh plugins do no less than that already. The problem being, these plugins work very badly in conjunction with MLP pack, as well, presumably, as with other plugins.
I guess that if we want this to be added to svn, instead of waiting for any big next release (which might take years), we’ll have to find a tag-syntax that’s backwards-compatible, e.g. that doesn’t brake sites that were built with the all those tags not taking into account parent categories.
Last edited by guiguibonbon (2007-04-02 09:32:50)
Offline
Re: couple of suggestions on categories
I have some minor suggestions for the categories, which are currently available through plugins, but i don’t understand, why these are not part of the core code:
1. txp:article_custom features from chh_article_custom
Could the article_custom tag be extended to allow in the parameter categories a list of categories instead of one category?
When displaying a parent category in a hierarchical category structure, it might be useful to allow for a “children” parameter, which displays all articles in the children categories.
What about displaying all categories except for one or two? There a exclude-parameter would be useful.
The issue with this features is, the chh_article_customs seems to be without maintainer. Currently, useres get some errors in debug-mode, and probably it could break in the future, but the plugin provides a lot of useful features, i’d rather have in the core than in this plugin.
2. txp:category_list features from e.g. cbs_category_list
I like this tag, but I miss a show count option which shows the number of articles published in the category, as we can see it currently in the admin-category-panel
Offline
Re: couple of suggestions on categories
txp:article_custom features from chh_article_custom
I second that, particularly given that chh_article_custom duplicates a lot of the existing txp code.
Yes, the ability to insert comma-separated lists of sections or categories would be great. Also the ability to search all sections excluding only some, for instance through an extra exclude attribute or a "!section-name" in the sections list would be great. This last I have hacked into chh_article_custom for one site.
Last edited by jakob (2007-06-22 09:06:58)
TXP Builders – finely-crafted code, design and txp
Offline
Re: couple of suggestions on categories
I like the "!section-name" solution, because it works well in tags like article_custom where you can specify both category and section in the attributes. And since there are already places where the section attribute accepts a comma separated list, it would be convenient to allow that everywhere.
Offline
Re: couple of suggestions on categories
Ruud, that’s great to hear :-)
Every time I use chh_article_custom I feel like I’m cheating because in essence it’s not far removed from the txp-own function.
TXP Builders – finely-crafted code, design and txp
Offline
#25 2007-06-23 02:09:58
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: couple of suggestions on categories
It seems to me we should continue with the way we already do it (include versus exclude attributes), rather than change format to something I think makes less sense (!section-name).
Offline
Re: couple of suggestions on categories
include/exclude by themselves don’t make sense as attribute values, because they don’t indicate what to include or exclude. Only combined with the tagname (category_list and such), it hints in the right direction.
But for a tag like ‘article’ or ‘article_custom’ (which doesn’t use include at all), using exclude would be wrong, I think, because it could apply to either section or category and you can’t use it for both. So either you end up with category names like ‘section-exclude’ and ‘category-exclude’ or a different approach is needed.
edit:
category="cat1,!cat2" is not the same as category-include="cat1" combined with category-exclude="cat2", because the first combines the conditions with boolean OR (‘cat1’ OR NOT ‘cat2’) while the second uses boolean AND (‘cat1’ AND NOT ‘cat2’). Hmm… in most cases you probably want boolean AND for the exclusion categories. When all you want to do is exclude categories (without explicitly including categories), both approaches have the same effect.
Last edited by ruud (2007-06-23 11:56:51)
Offline
Re: couple of suggestions on categories
Taking into account that parts of the target audience for a tag’s syntax are designers familiar with HTML and XML, shouldn’t we refrain from assuming that ! is understood, like we did for NOP?
Offline
Re: couple of suggestions on categories
Hehe… touche :)
Offline
#29 2007-06-24 01:44:54
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: couple of suggestions on categories
Ruud: Exactly, that’s how it already works for the other tags. Please let’s not mix different approaches to the same concept.
Offline