Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: [attribute] breakby
Hehe. Yeah, we could do with demystifying some of the terminology. ‘string’ – while technically accurate – doesn’t really cover what you can do with it. Although a form name is a string, it triggers different behaviour because it goes and fetches a form and uses its contents rather than just using the (string) contents of the attribute verbatim.
Now that the docs repo is self-hosted (yay, Pete) we have more scope to run Jekyll and other shell scripts which weren’t available to us when hosted on GitHub. That might be helpful for us to think about this in a more program-oriented way, e.g. define tags and their attributes in some terse markup language such as YAML and run a script to generate the tags doc pages and attribute cross ref pages. Then we only ever update in one place and rerun the script to spit out the docs.
Food for thought. It’s just code. And code is pottery.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Hire Txp Builders – finely-crafted code, design and Txp
Offline
Re: [attribute] breakby
phiw13 wrote #333560:
your form name is actually a “string“
Good point.
cognitively the jump to “use a form” is a little difficult for me.
Me too. But apparently it is needed for what I am trying to do.
But, again, good point on the string thing, that brought that use context out a bit for me there.
my humble understanding, “string” = “a series of alphanumerical characters”.
Yes, I think that’s correct. I just saw that explained somewhere in context of using <txp:title breakby="" yield="1" /> to give the first letter of a title, for example.
Last edited by Destry (2022-06-09 12:29:34)
Offline
Re: [attribute] breakby
breakform is not in the tags attributes cross-reference, btw.
Offline
Re: [attribute] breakby
Well, we’ve got (currently) 3 contexts for breakby.
- Breaking by txp tags (inline or in a form) as described here concerns only content listing tags:
<txp:article />and its derivatives,<txp:images />,<txp:linklist />and<txp:file_download_list />. This could change, but is technically not trivial. - Breaking by numbers works for all tags (4.8.9)
- Breaking by character(s) works for ‘atomic’ tags, i.e. those that can not loop over a collection of items (articles, categories, etc) and thus previously had no
break,limitand other ‘list’ attributes.
It’s probably too early for a definitive guide to these freshly modified attributes.
Offline