Search
Other Articles Anywhere questions
Forum

more than one hit on queries of the same custom field results in zero output

Hitsch's Avatar Hitsch
we have a Custom Options Field with three values to choose from, of which one, two or all three can be selected.
Field "type
Options: video, audio, text
{if type:value="Video"}<img src="video.png">{/if}
{if type:value="Text"}<img src="text.png">{/if}
{if type:value="Audio"}<img src="audio.png">{/if}

We successively query the values and, if a value is present, insert the corresponding image. This works until more than one option is active, i.e. a post is of type "text" as well as "video":

Then no image appears, i.e. articles anywhere does not output a hit.

What can we do?
Peter van Westen's Avatar Peter van Westen ADMIN
See: docs4.regularlabs.com/articlesanywhere/g...ck-value-of-the-data

Use the 'IN' operators for stuff that can contain multiple values.
Please post a rating at the Joomla! Extensions Directory
Hitsch's Avatar Hitsch
I try
{if 'Video' IN type}<img src="icon_video.png">{/if}
with no result. What can I do?
Peter van Westen's Avatar Peter van Westen ADMIN
By default the {if} tags will check for the value of the fields, not the text output.
So if your 'type' field as the option 'vid' with text 'Video', you should do:
{if 'vid' IN type}
Or:
{if 'Video' IN type:text}
Please post a rating at the Joomla! Extensions Directory
Hitsch's Avatar Hitsch
fine, so it works, thanks!
Hitsch's Avatar Hitsch
somehow there is something up my sleeve.... - but
{if 'Video' IN typ:text}
(custom field: typ, Value: Video) results in no output. Do you have another idea how we can query Custom Option Field Values?
Peter van Westen's Avatar Peter van Westen ADMIN
Try double quotes…
Please post a rating at the Joomla! Extensions Directory
Hitsch's Avatar Hitsch
Yeep, now! Fine Thank You!
You can only post on the extension support forum if you have an active subscription and you log in

Buy a Pro subscription