Community guidelines
Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.
Benjamin Member
@brigaill · Joined 9 years ago · 18 posts · 7 topics · 2 reputation
Badges
Recent posts
-
Hyphenize tags containing spaces, per page in collection
· 5 years ago
Very sorry, I think I forgot to add {% set tags = [] %}. I tried so many times yesterday that I don't remember if I used it in my first tries. I try again. Just to clarify, as I am calling my child pa
-
Hyphenize tags containing spaces, per page in collection
· 5 years ago
Hello @Karmalakas, many thanks for your reply. So following your advice, I tried to do this: Karmalakas {# Step 1: Hyphenise each tag and add to array of tags #} {% for child in page.children %}
-
Hyphenize tags containing spaces, per page in collection
· 5 years ago
This is a split-off to my previous post /forum/themes-styling/hyphenise-tags-which-contain-spaces-t5003 in which I needed to hyphenize tags containing a space. Basically I need to do the same, but now
-
Hyphenise tags which contain spaces
· 5 years ago
Now I am trying to hyphenize tags which have spaces, but if I do this: {% set filter = p.taxonomy.prestation|join(' ')|hyphenize %}{{ filter }} it outputs hyphens even between tags as shown below: dat
-
Spaces between tags except at beginning nor end
· 5 years ago
Thanks so much for your help @pamtbaau , you saved me a lot of time ! I try to learn twig but as I am not a developper, it's quite hard for me. Indeed It was that simple. I guess my mistake was trying
-
Spaces between tags except at beginning nor end
· 5 years ago
Hello, I want to output my taxonomy tags in a li tag as filter attributes as shown below: <li data-filter=" {% for tag in p.taxonomy.tag %} {{ tag }} {% endfor %} "> It outputs this, for examp
-
Sort custom fields by descending date with sort_by_key filter
· 8 years ago
I think I found a solution with the Twig reverse filter 😀 So I did this: {% for recordingItem in recordingItems|reverse|slice(0,3) %} ... and I can display my last 3 items as following: Note: I added
-
Sort custom fields by descending date with sort_by_key filter
· 8 years ago
Hello, Sorry if it is a silly question but I am trying to sort a custom field collection by descending date but can't find out how to do this with the sort_by_key filter. Could someone please tell me