Questions tagged [merge]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
5
votes
2answers
18k views

Using Twig to merge an array and remove duplicates

Problem I'm building a .json file for a search component of a used cars website. The file needs to be built from the output of two sections within CraftCMS, Used Cars and Vans & Trucks. It ...
2
votes
1answer
2k views

Create an object of objects with merge

I'm trying to create an object of objects, can anyone suggest why object would only contain the last iteration of "itemObject"? {% set object = {} %} {% for entry in craft.entries.section("...
1
vote
1answer
107 views

Merge Entries but only after X amount of entries

I'm trying to get entries from two sections and merge them together which is pretty straight forward using the merge filter. For example, my sections are: News Promoted News But, my main issue is I ...