Documentation · ViewHelper reference

XSD schema file | vhs 2.1.4

Iterator / MergeViewHelper

Merges arrays/Traversables $a and $b into an array

  • Tag usage example

    <v:iterator.merge a="[mixed]" b="[mixed]" useKeys="1">
    	<!-- tag content - may be ignored! -->
  • Inline usage example

    {v:iterator.merge(a: [mixed], b: [mixed], useKeys: 1)}


Argument Description Type

First array/Traversable


Second array/Traversable


If TRUE, comparison is done while also observing (and merging) the keys used in each array

Required attribute

Revision history

commit f021281c18133ed209c851229b82784c3dde7764
Author: Claus Due <*****>
Date:   Wed Jan 2 14:01:41 2013 +0100

    [FEATURE] Iterator / Merge ViewHelper
    Merges two Traversable/Array instances into one raw Array, returning that array or inserting it as a template variable while rendering the child content if using the "as" argument.

commit b3910ee54859a9fad46edec2841c311477a170ec
Author: Claus Due <*****>
Date:   Wed Jan 30 22:12:13 2013 +0100

    [TASK] CGL cleanup and slight refactor, Iterator / Merge ViewHelper

commit 5295ac815a2591893725f539dd4612ece702f8e9
Author: Björn Fromme <*****>
Date:   Mon Dec 16 17:54:41 2013 +0100

    [BUGFIX] Use property not local variable

commit 2e661f9a7c47fbea5e691259917e841b8e7c53e2
Author: Björn Fromme <*****>
Date:   Mon Dec 16 18:15:40 2013 +0100

    [TASK] Use ViewHelperUtility method

commit da31bad1d9bb058c072ddb5591e8ed907a1ae8e1
Author: Claus Due <*****>
Date:   Tue Dec 31 23:08:37 2013 +0100

    [TASK] Happy new year!

commit d2e531da034976e6db1478eef5a8478595fd16fe
Author: Claus Due <*****>
Date:   Sun Jan 5 00:45:10 2014 +0100

    [TASK] Migrate to using namespace core class names

commit da7677bc74f14e9a9300e4ba4487e52c3cb97642
Author: Claus Due <*****>
Date:   Sun Apr 20 01:13:33 2014 +0200

    [TASK] Switch to namespaces

commit 8bb2fc5ee124ba19b0a0ab8e061c9a153fc4651f
Author: Xaver Maierhofer <*****>
Date:   Sun Jan 18 17:56:13 2015 +0100

    [TASK] Reference Copyright to file

commit 036b60cfc7abbc6f7e2266c2d4e483eb45fa61b6
Author: Stefan Neufeind <*****>
Date:   Sat Jan 24 19:03:48 2015 +0100

    [FEATURE] Allow iterator.merge to be used in a chain
    Allow use like:
    {abc -> v:iterator.merge(b: def)}
    This makes it easier to join multiple arrays
    in a row and also to workaround some cases
    where the Fluid-parser might otherwise
    have a hard time.