Targeting only one field of a Multiple Text Field


(afonso@shelter) #1

Hey,
I am using metadata and I would like to return the content of, say just the first field of a multiple text field.
The reason why I want to display them separately is so that I can "control" how they are presented on the front-end. I want to display this content as a list but Squiz, by default, displays as a text.

E.g.

Default:

Edinburgh; Glasgow; Dundee;

 

 

Desired:

  • Edinburgh;
  • Glasgow;
  • Dundee;

 

Tried a few keywords. Found some that wrap the content in a tag, any tag, but still it's the whole content and not each of the fields.

Thanks


(Bart Banda) #2

Hey, I usually use this modifier:

%asset_metadata_keywords^replace:;:</li><li>^tagif:li^tagif:ul%

Original: Value 1; Value 2; Value 3

Result: <ul><li>Value 1</li><li>Value 2</li><li>Value 3</li></ul>

More useful keyword modifiers here: https://matrix-manuals.squiz.net/keyword-replacements/examples/useful-keyword-modifiers