Textpattern CMS support forum

You are not logged in. Register | Login | Help

#11 2018-11-08 12:16:42

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 6,911
Website

Re: experimenting with the evaluate tag

I guess my confusion lied and solved by what Julian wrote.

I actually thought that we could directly target a field with the tag but… I got the test attribute now.


Yiannis
——————————
neme.org | hblack.net | LABS | State Machines | NeMe @ github

Offline

#12 2018-11-08 20:58:11

etc
Developer
Registered: 2010-11-11
Posts: 2,949
Website

Re: experimenting with the evaluate tag

colak wrote #315081:

I actually thought that we could directly target a field with the tag

Wouldn’t that just make it <txp:if_custom_field /> clone? Or are you thinking of multiple cf testing? Then we could amend <txp:if_custom_field /> in this sense.


etc_[ query | search | pagination | date | tree | cache ]

Offline

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

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,458
Website

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: 2,949
Website

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" />

etc_[ query | search | pagination | date | tree | cache ]

Offline

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

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,458
Website

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: 2,949
Website

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.


etc_[ query | search | pagination | date | tree | cache ]

Offline

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

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,458
Website

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