Trim white space from Get output

Hi all,

I want to add taxonomy genres to inline html classes.

I use:
<set name="category-classes">
<loop taxonomy="genre" post="current" separator=" ">
<field name="slug"></field>
</loop>
</set>
<div class="col case {Get name=category-classes}">

The output however contains a lot of spacing between the classes… I also tried to write the set loop as one string but it didnt help

Any idea?

Thx

Ok, already fixed it. Put the entire loop within brackets in the HTML class attribute… maybe it was to easy :slight_smile:

<div class="col case{Loop taxonomy='genre' post='current' separator=' '} {Field name='slug'}{/Loop}">

Output is perfect.

Maybe other best practices?