Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2017-07-03 12:04:47

NicolasGraph
Plugin Author
From: France
Registered: 2008-07-24
Posts: 860
Website

About tag names consistency

<txp:image_list /> was deprecated in Txp 4.4 in favour of <txp:images />.
I can’t remember or find if there was a reason to not change <txp:linklist /> to <txp:links />, <txp:category_list /> to <txp:categories />, <txp:section_list /> to <txp:sections />, etc. Is there a plan to unifiy tag names at some point?


Nicolas
Follow me on Twitter and GitHub!
Multiple edits are usually to correct my frenglish…

Offline

#2 2017-07-03 12:38:48

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

Re: About tag names consistency

IIRC, <txp:image_list> was never officially used as it was changed prior to release, but I might be wrong. I chose it for consistency with the other _list tags but Robert chose images instead. The only reasons not to change the others to this scheme are:

  • If they would clash with an internal PHP function (because our functions are in the global scope, presently). The ones you cite are fine, and this should be less of an issue in future when/if we namespace our tags.
  • For backwards-compatibility. Avoids people changing their existing tags over.

The second issue could be addressed by using a tag alias, or through use of a simple stub tag function during some migration period.

In short, there’s no technical reason not to do it. The question is only if we feel it’s necessary.


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

#3 2017-07-03 14:13:41

NicolasGraph
Plugin Author
From: France
Registered: 2008-07-24
Posts: 860
Website

Re: About tag names consistency

Thanks for the reply.

Bloke wrote #306157:

The second issue could be addressed by using a tag alias, or through use of a simple stub tag function during some migration period.

That’s what I was thinking about.

In short, there’s no technical reason not to do it. The question is only if we feel it’s necessary.

It is definitly not necessary, I just thought that it may be more intuitive for beginners or occasional users to stick to a naming scheme. Here it would be also shorter to enter. I thought about <txp:images /> but there is also the recent <txp:authors /> which do not follow the tag_list scheme. Not a big deal, just a thought…


Nicolas
Follow me on Twitter and GitHub!
Multiple edits are usually to correct my frenglish…

Offline

#4 2017-07-03 15:58:48

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

Re: About tag names consistency

Consistency would be a big plus for me. Along with a review of the existing tags and some kind of sanitization process because we have too many, imo. So many conditionals… so many comment tags…


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