FluidTYPO3/vhs — pull request #332 by benjaminrau (2013-09-25 13:15:48+00:00)
Title: [FEATURE] Chunk ViewHelper

array_chunk() is a really helpful function which functionality should be available as a ViewHelper.

Fx if you have an Array of pages from v:page.menu and want to allocate these links to a fixed number of container elements this would be much code without this ViewHelper.

Fx we have 9 links which shall be placed in 2 containers of same count of items each, if odd the first container takes more all.

Expected html markup:

1. Link
2. Link
3. Link
4. Link
5. Link

6. Link
7. Link
8. Link
9. Link

With this ViewHelper this is an easy task:
{links->v:iterator.chunk(count:2,fixed:1)->v:var.set(name:'chunks')}

{item}

{item}