Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2018-11-08 21:16:25

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

Re: experimenting with the evaluate tag

etc wrote #315107:

Or are you thinking of multiple cf testing?

Can’t we already do this, in a sense, with the match attribute and/or separator? Or have I missed the point of what colak is trying to do?


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

#14 2018-11-08 21:28:03

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

Re: experimenting with the evaluate tag

Bloke wrote #315108:

Can’t we already do this, in a sense, with the match attribute and/or separator?

We do for values, but not for names. I thought of something like

<txp:if_custom_field name="home, work" value="Leeds" />

Offline

#15 2018-11-08 21:32:25

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

Re: experimenting with the evaluate tag

etc wrote #315110:

<txp:if_custom_field name=“home, work” value=“Leeds” />

That would work, I like it. No idea what would happen if you tried to put a list in both name and value though… urk.


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

#16 2018-11-08 21:39:46

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

Re: experimenting with the evaluate tag

Bloke wrote #315111:

No idea what would happen if you tried to put a list in both name and value though… urk.

Well, we would just loop over name and check for matches with value as at present. If any (or all?) names match, then if is true.

Offline

#17 2018-11-08 21:41:53

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

Re: experimenting with the evaluate tag

etc wrote #315114:

Well, we would just loop over name and check for matches with value as at present. If any (or all?) names match, then if is true.

Sure, if that can work with the various match types and separator, then it’d be pretty neat.


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

Board footer

Powered by FluxBB