0

This is a kind of follow up to this question:

I have a view where I added taxonomy tags as custom CSS class for rows of a unformatted list:

<div class="views-row views-row-1 views-row-odd views-row-first tag1-tag2-tag3">

I did that using Replacement Pattern [tags] as row class.

The problem is that I need to filter by tags and so every taxonomy tag should be added as a separate class. I would need spaces instead of - so the output would be something like that:

<div class="views-row views-row-1 views-row-odd views-row-first tag1 tag2 tag3">

Is this possible with Views GUI or do I have to use Views preprocess function?

1

if you're using multivalue class token, this bug report may be of interest for you. There's also a patch as a workaround available.

Currently if a views field token contains multiple space-separated class names, these classes will be combined into one class when the string is run through drupal_html_class(). Attached is a patch to split token classes before they are sanitized for HTML.

-2

Under "Format" in the left column of the view, you click on "Settings" near the format you choosed, for example "Unformatted list".

In the popup you can edit the row classes.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.