Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#13 2010-10-05 18:44:52
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: [wiki] Tag listings, attributes cross-reference
Thanks Rick! I have been thinking for a while it might be better to remove it, but we’d have to be absolutely certain that no one is actually using it ;) So, how do we find out if – core or plugin – developers are still using the reference this way?
Offline
Re: [wiki] Tag listings, attributes cross-reference
Thanks Els, I like how the TOC works, while I have concerns about whether this is worth the trade-off of making the attributes listings longer and arguably less clear, with both a header and dt for each attribute. Then there’s also the question of the cross-reference. That every attribute links to it makes it seem more important or useful than it really is. The links are misleading, I think. If you click on, say, wraptag
you would probably expect a more detailed explanation or an example, not a listing of other tags using the same attribute.
Code is topiary
Offline
#15 2010-10-05 22:50:24
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: [wiki] Tag listings, attributes cross-reference
Jeff, I agree about the attributes listing. Leaving it as it is is also acceptable to me ;)
And as far as I’m concerned the cross-reference can go (but that’s just me).
Offline
#16 2010-10-06 03:05:31
- rsilletti
- Moderator
- From: Spokane WA
- Registered: 2004-04-28
- Posts: 707
Re: [wiki] Tag listings, attributes cross-reference
Els
Rather than maintain the cross reference itself, perhaps a more direct written guideline for standardizing attributes might suffice.
Offline
Re: [wiki] Tag listings, attributes cross-reference
Els, et al: please see article. I’ve broken the 5 common list presentation attributes out into a template. If you approve, I will use this across all the other tags that use all 5. Note that this will appear in the TOC.
Last edited by jsoo (2010-10-06 10:37:52)
Code is topiary
Offline
Re: [wiki] Tag listings, attributes cross-reference
jsoo wrote:
I’ve broken the 5 common list presentation attributes out into a template
W00t! Excellent stuff. The only thing is that label / labeltag / break aren’t as widely deployed as wraptag / class / etc (the cross-reference is useful after all! :-) so we’ll not be able to use this template in as many cases as we might otherwise.
The shortest lists are break and labeltag with about 12-14 tags using them. But that’s still 12-14 tags’ worth of maintenance saved, which is miiiighty impressive. The only possible way I can see to get even more savings is to split it into sub-templates with wraptag and class in one, and break/label (possibly labeltag too) in another? Mind you, that starts getting complicated with headings and stuff, so just ignore me.
I like this approach. Nice work, Jeff.
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
Re: [wiki] Tag listings, attributes cross-reference
Oh, kewl: turns out templates are more versatile than I hoped. I’ve split wraptag
and class
into their own sub-template, and the common attributes template calls that in turn. The key is that the template is simply echoed as is, so you can have several templates making up a single definition list.
Edit: Not quite a simple echo: breaking attributes out into separate sub-templates results in each one creating a new dl. Visually there seems to be no difference; semantically it is not so good. Thoughts?
Last edited by jsoo (2010-10-06 13:01:53)
Code is topiary
Offline
Offline
Re: [wiki] Tag listings, attributes cross-reference
What do you think of the class
attribute, with a link to the cross-ref to show the default values?
I think if default values are to be shown, it needs to be complete.
Or what about an attribute listing like this:
wraptag=“tag”- (X)HTML tag (without brackets) to wrap around the list.
- For most tags the default value is unset (no wraptag applied).
- A few tags (search_input, breadcrumb, comments_error) specify a default tag.
Code is topiary
Offline
#22 2010-10-06 18:37:37
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: [wiki] Tag listings, attributes cross-reference
If that wiki was built with Txp we’d only have to add a couple of conditionals to show the right default value ;)
But seriously, Jeff, I love what you did and it will save all of us a lot of work. As for the exceptions, I agree with Jukka, mentioning other tags in the description of the current one can be confusing. I think I prefer the link to the cross-reference. You only need one more click to find the appropriate default value, I don’t see that as a problem.
Great job!
Offline
Re: [wiki] Tag listings, attributes cross-reference
Thanks Els. Now all the exceptions are shown in the cross-reference, not the attribute listings.
I’ve applied the same idea to a group of tags that use label
, class
, and wraptag
. Unfortunately three of these don’t actually use class
:( So I added a note. I’ll put in a feature request to have it added.
Code is topiary
Offline
Re: [wiki] Tag listings, attributes cross-reference
Els wrote:
If that wiki was built with Txp we’d only have to add a couple of conditionals to show the right default value ;)
The tag reference was originally built using Textpattern – http://kusor.com/en/txptags/
Yesterday, I posted about displaying the tag reference in the admin. Today, I got into the Delorean and went Back to the Future ;)
By the way, these tags don’t have subcategories:
link_feed_link and text = Markup subcategory?
We Love TXP . TXP Themes . TXP Tags . TXP Planet . TXP Make
Offline