Add custom delimiter (separator) between mutiple values

Hello,

I would like to add commas between terms of a taxonomy in the display of a content type.
E.g. I have a list of languages available for each one of my touristic / educational offer, which are currently displayed this way:
Capture
See https://test-voisins2.web.cern.ch/public-events-globe-science-and-innovation.

I don’t want them to be linked to an URL like tabs.

How can I add commas between the terms?

Many thanks,

Marie

Hello Marie,

You can try the Field Delimiter module that provides the option to add a “separator” between fields when you have multiple fields.

Hope that works for you

Konstantinos

Hi Kostas,

Yes, it worked great on my default views! Thank you!!

However, the comma won’t display in my Preview Lists views:


(See https://test-voisins2.web.cern.ch/news)
Any idea how to force it?

Have a nice evening!!

Marie

It is because you have set it for the Default display but not for any other. I checked your content type and the News view uses the News Preview List, so you have to set the delimiter to be applied in the News Preview List display too.

By the way, using the Default display to display your node page is a bad practice because the default display is the one that will be used when no other display is selected. As a result if you have any views in your website that you have not set a display, the content will be displayed as a page . My suggestion is to enable the Full Content view mode and map the “node fields” in this one. By default Drupal uses the Full Content to display the node page.

Konstantinos

Hi Kostas,

Are you sure that you have checked the right website?
If so, I really don’t get what you suggest…

  1. I have not set the comma delimitor for the Default display, but for the “News previews list” display (https://test-voisins2.web.cern.ch/admin/structure/types/manage/news/display/preview_list)

  2. The Full content is already my default display for the News Content type:
    Capture2

Kind regards,
Marie

Hello,

You are right my fault. I checked again and it seems that in order for the delimiter to work, it requires set the pattern settings to Default. However in this case the date will appear in the next line.

Since it is an issue that appears long time now, I will apply a fix for that so that it will work even when you apply with Default template settings

Konstantinos

Cool, thanks!! It is working indeed :slight_smile:
Is there a way to have both the delimitor and the date on the same line?

The fix that I mention in my last answer should fix it

1 Like

Hello Marie,

I applied the fix for the fields to always appear inline and it will be deployed in version 2.7.1 of CERN Components.

Konstantinos