Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2025-09-15 20:53:55

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,996
Website GitHub

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

#14 Yesterday 09:04:51

etc
Developer
Registered: 2010-11-11
Posts: 5,462
Website GitHub

Re: all-grid, a flexible theme for Textpattern

jakob wrote #340530:

Not sure I follow you. Can you explain?

I mean allowoverride ='<if::individual_article />' is clear enough, once you know that the tag returns 1 or empty string.

Offline

#15 Yesterday 09:45:16

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,996
Website GitHub

Re: all-grid, a flexible theme for Textpattern

Bloke wrote #340513:

For the time being, yes please.

Done – txp:article and txp:article_custom


TXP Builders – finely-crafted code, design and txp

Offline

#16 Yesterday 09:46:33

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,996
Website GitHub

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 returns 1 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

#17 Yesterday 11:51:59

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,479
Bitbucket GitHub

Re: all-grid, a flexible theme for Textpattern

jakob wrote #340536:

Done – txp:article and txp:article_custom

Both merged – thanks, jakob!

Offline

#18 Today 07:52:51

phiw13
Plugin Author
From: South-Western Japan
Registered: 2004-02-27
Posts: 3,456
Website

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 returns 1 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

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,939
Website GitHub

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

phiw13
Plugin Author
From: South-Western Japan
Registered: 2004-02-27
Posts: 3,456
Website

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

Board footer

Powered by FluxBB