Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: Docs site refresh effort
li
is a more common break for menus such as section_list
and related_articles
but I think that if the attribute becomes global, unset
will be the list invasive.
Re Oleg’s very valid comment. I can see issues with a number of tags such as txp:die
, if_yield
, in fact most of the if_
tags, etc. I’m wondering if tags could be divided into front end presentation for the ones which actually render some content, and conditional for the ones that test the context. site_name
is a strange hybrid tag which can be used both in the head and the body of an article, txp:css
though is the one which might help into making the decision.
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: Docs site refresh effort
colak wrote #328295:
li
is a more common break for menus such assection_list
andrelated_articles
but I think that if the attribute becomes global,unset
will be the list invasive.… I’m wondering if tags could be divided into front end presentation for the ones which actually render some content, and conditional for the ones that test the context.
Global attributes have no default value, one must call them explicitly. Also, they are (mostly) tag-agnostic. Actually, global break
has little value per se: why would one want to break the site name? It was introduced mainly as a counterpart to fields="list(field)"
article attribute. You can try this example with and without wraptag="ul" break="li"
attributes to see how they work:
<txp:article_custom fields="authorid, list(title)">
<h3><txp:author /></h3>
<txp:title wraptag="ul" break="li" />
</txp:article_custom>
Offline
Re: Docs site refresh effort
All good. I was thinking in terms of the default we set in the docs include file. Currently it’s br
. When you call the include, you can optionally override this default by passing break="some thingy"
into the include template. That will override the default value that displays in the tag for that attribute.
We often need this for class
. It’s usually empty and takes whatever you give it, but sometimes the class is preset to be the name of the tag. So you can pass this in as an exception when the tag page is built.
What I don’t want to do is have the default for break set to ‘br’ and then find nearly every single include from every tag page needs to override this. I’d rather set the include to use the most common break attribute value we use in core, and then override it if necessary for a handful of tags. Make sense?
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: Docs site refresh effort
Ah, got it. Well, br
seems to be the most common one among the tags that accept it natively, closely followed be the empty string.
Offline