Values from Multiple Select List


(M L Sanders) #1

Matrix Version: 5.3.3.0

Anyone know how to seperate the front-end printed values if multiple values are selected for Select metadata?

Putting code in the values of the metadata options doesn’t seem to work…

thanks

m


(Bart Banda) #2

Not sure what you mean? Are you just wanting to separate the values using a different delimiter than the default semi-colon?

Using something like a ^replace keyword modifier on the metadata select field keyword?


(M L Sanders) #3

Fixed (from code found on this forum, I believe).

Yes, Bart, the question was about replacing the semi-colon that seperates multiple values and wrapping the whole thing in an appropriate tag. So here’s the code:

%asset_metadata_<metadata-name>^replace:;:</li><li>^tagif:li^tagif:ul%

So that:

  • Replaces each semi-colon with a closing li tag followed by an opening li tag;
  • Wraps the whole thing in a single li tag and then
  • Wraps the whole thing in a single ul tag

Perfect


(M L Sanders) #4

Bart: how on earth do I mark this topic as ‘Closed’ (and give you credit for the ‘best’ suggestion)?


(Bart Banda) #5

All good, no need to mark as closed, have ticked your post as the solution to the problem. You can do it via the comment tools exposed by clicking on the “show more” dots.

Thanks for sharing the solution!