Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-07-07 15:52:31

supafunk
Member
Registered: 2006-03-05
Posts: 15

looking for value within custom field

Hi,

The following tag:

<code><txp:if_custom_field name=“fieldname” val=“fieldvalue”></code>

looks for an exact match between the field value specified in the tag and the value specified in an article’s custom field. Is there any way to see if the field just contains the specified value? So if the tag was:

<code><txp:if_custom_field name=“field1” val=“Terry”></code>

It would still “work” if the contents of “field1” was something like “BobTerryFrank”.

Like how the cch_article plugin looks for articles which have a certain value within a custom field with the following tag:

<code><txp:chh_article customfield1=“fieldvale” /></code>

A possible, more organised solution here might be the pack custom fields plugin I suppose.

Cheers
Tom

Offline

Board footer

Powered by FluxBB