Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2020-12-28 12:34:04

gaekwad
Admin
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 3,344

Extracting tag attributes from source code

Hi, tag experts. I have a question.

Is there a way to programmaticaly extract tags and their valid attributes from our source code? I asked this in a different format way back in 2012 here and subsequently made a tag + attribute matrix which I updated manually. It has since been deleted and was hideously out of date, so nothing of real value has been lost.

One thing I would very much like to do as part of the docs refresh effort is to ensure our own documentation includes examples and explanations for folks wishing to make better use of Textpattern tags. One of the ways we can do this is to ensure that tags have their valid attributes listed — comprehensively so — and to ensure common attributes work across similar tags where necessary.

I need to warm up my brain to this project, and rather than manually chewing through taghandlers.php & friends, I’m paging the forum hive mind to see if there’s a smarter, more automated way to achieve a list of Textpattern tags and their attributes in a vaguely human-friendly text list.

This also has the added benefit of being useful for more automated testing as we get closer to that. Take a look at “#671“https://github.com/textpattern/textpattern/issues/671 if you want to know more about that.

Offline

Board footer

Powered by FluxBB