Documentation · ViewHelper reference

XSD schema file | vhs master

Resource / CollectionViewHelper

Collection ViewHelper

This viewhelper returns a collection referenced by uid. For more information look here: http://docs.typo3.org/typo3cms/CoreApiReference/6.2/ApiOverview/Collections/Index.html#collections-api

Example

{v:resource.collection(uid:'123') -> v:var.set(name: 'someCollection')}

/

  • Tag usage example

    <v:resource.collection uid="123" identifier="[mixed]" categories="[mixed]" treatIdAsUid="1" treatIdAsReference="1">
    	<!-- tag content - may be ignored! -->
    </v:resource.collection>
  • Inline usage example

    {v:resource.collection(uid: 123, identifier: [mixed], categories: [mixed], treatIdAsUid: 1, treatIdAsReference: 1)}

Arguments

Argument Description Type
categories

The sys_category records to select the resources from (either CSV, array or implementing Traversable).

mixed
identifier

The FAL combined identifiers (either CSV, array or implementing Traversable).

mixed
treatIdAsReference

If TRUE, the identifier argument is treated as reference uids and will be resolved to resources via sysfilereference.

boolean
treatIdAsUid

If TRUE, the identifier argument is treated as resource uids.

boolean
uid integer
Required attribute

Revision history

commit f43993449303c7d62cbb0cceb179b0a9626eb5e6
Author: Dmitri Pisarev <*****@gmail.com>
Date:   Tue May 27 19:35:21 2014 +0400

    [FEATURE] Add CollectionViewHelper
    
    Use RecordCollection API to retrieve RecordCollection by uid.

commit e5aa4d015557df689767b81847eb3ed625be7ec2
Author: Björn Fromme <*****@bjo3rn.com>
Date:   Fri Dec 5 11:26:33 2014 +0100

    [TASK] Whitespace fix

commit d982a559c439c7554d3e5efa3e2c77c14612930f
Author: Xaver Maierhofer <*****@xwissen.info>
Date:   Sat Jan 17 16:49:53 2015 +0100

    [TASK] CGL - Remove backslashes in use

commit 4981055359c895f3869e5bd878293b3c15ed26e5
Author: Xaver Maierhofer <*****@xwissen.info>
Date:   Sun Jan 18 14:01:04 2015 +0100

    [TASK] CGL - Define classes, params, use imports

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

    [TASK] Reference Copyright to license.md file