Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#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

#26 2007-06-23 10:36:51

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

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

#27 2007-06-23 20:43:53

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,323
Website Mastodon

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

#28 2007-06-23 20:46:00

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

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

Board footer

Powered by FluxBB