Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: all-grid, a flexible theme for Textpattern
etc wrote #340515:
Might be a good example of using conditional tags in the ‘single’ form.
Not sure I follow you. Can you explain?
Do you mean semantics or the single tag feature itself?
I meant having the additional attribute values allowoverride="form"
and allowoverride="listform"
.
TXP Builders – finely-crafted code, design and txp
Offline
Offline
Re: all-grid, a flexible theme for Textpattern
TXP Builders – finely-crafted code, design and txp
Offline
Re: all-grid, a flexible theme for Textpattern
etc wrote #340535:
I mean
allowoverride ='<if::individual_article />'
is clear enough, once you know that the tag returns1
or empty string.
Ah right: I thought you might be making a tantalizing hint at some other use case I haven’t thought of.
TXP Builders – finely-crafted code, design and txp
Offline
Re: all-grid, a flexible theme for Textpattern
Offline
#18 Today 07:52:51
Re: all-grid, a flexible theme for Textpattern
etc wrote #340535:
I mean
allowoverride ='<if::individual_article />'
is clear enough, once you know that the tag returns1
or empty string.
I find that a little confusing, honestly. The tag’s description int the docs:
The if_individual_article tag is a conditional tag and always used as an opening and closing pair
(Emphasis added on “always”)
But then here it is used as single tag. ??
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
phiw13 on Codeberg
Offline
#19 Today 09:07:09
Re: all-grid, a flexible theme for Textpattern
phiw13 wrote #340542:
(Emphasis added on “always”) But then here it is used as single tag. ??
Okay, yeah, that is not clear at all. We should revisit the documentation of conditional tags.
I’m not quite sure when it changed but all(?) conditional tags can now be used as a single tag if all you want to do is test whether the condition is true/false rather than do something with contained content when it is true/else.
They return 1
if true, as Oleg states, and empty if false.
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
#20 Today 09:15:35
Re: all-grid, a flexible theme for Textpattern
Bloke wrote #340544:
Okay, yeah, that is not clear at all. We should revisit the documentation of conditional tags.
I’m not quite sure when it changed but all(?) conditional tags can now be used as a single tag if all you want to do is test whether the condition is true/false rather than do something with contained content when it is true/else.
They return
1
if true, as Oleg states, and empty if false.
Thanks for clarifying. This use as a single tag as a (simple) test makes sense, actually. Your comment belongs somewhere in the docs.
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
phiw13 on Codeberg
Offline