Documentation · ViewHelper reference

XSD schema file | vhs 2.1.3

Content / RenderViewHelper

ViewHelper used to render content elements in Fluid page templates

  • Tag usage example

    <v:content.render column="123" limit="123" order="'sorting'" sortDirection="'ASC'" pageUid="123" contentUids="{foo: 'bar'}" sectionIndexOnly="1" slide="123" slideCollect="123" slideCollectReverse="1" loadRegister="{foo: 'bar'}" render="1" hideUntranslated="1" as="NULL">
    	<!-- tag content - may be ignored! -->
    </v:content.render>
  • Inline usage example

    {v:content.render(column: 123, limit: 123, order: ''sorting'', sortDirection: ''ASC'', pageUid: 123, contentUids: {foo: 'bar'}, sectionIndexOnly: 1, slide: 123, slideCollect: 123, slideCollectReverse: 1, loadRegister: {foo: 'bar'}, render: 1, hideUntranslated: 1, as: 'NULL')}

Arguments

Argument Description Type
as

If specified, adds template variable and assumes you manually iterate through {contentRecords}

string
column

Name of the column to render

integer
contentUids

If used, replaces all conditions with an "uid IN (1,2,3)" style condition using the UID values from this array

array
hideUntranslated

If FALSE, will NOT include elements which have NOT been translated, if current language is NOT the default language. Default is to show untranslated elements but never display the original if there is a translated version

boolean
limit

Optional limit to the number of content elements to render

integer
loadRegister

List of LOAD_REGISTER variable

array
order

Optional sort field of content elements - RAND() supported

string
pageUid

If set, selects only content from this page UID

integer
render

Optional returning variable as original table rows

boolean
sectionIndexOnly

If TRUE, only renders/gets content that is marked as "include in section index"

boolean
slide

Enables Content Sliding - amount of levels which shall get walked up the rootline. For infinite sliding (till the rootpage) set to -1)

integer
slideCollect

If TRUE, content is collected up the root line. If FALSE, only the first PID which has content is used. If greater than zero, this value overrides $slide

integer
slideCollectReverse

Normally when collecting content elements the elements from the actual page get shown on the top and those from the parent pages below those. You can invert this behaviour (actual page elements at bottom) by setting this flag))

boolean
sortDirection

Optional sort direction of content elements

string
Required attribute

Revision history

commit 80f900fcb02a682e79ef34dce3c5af19640508c9
Author: Claus Due <*****@wildside.dk>
Date:   Tue Mar 5 00:25:15 2013 +0100

    [TASK] Refactor renderContent ViewHelper to Content / Get and Content / Render ViewHelpers

commit 5511d72d220d89627255e270d3ca178362f6c2b2
Author: Claus Due <*****@namelesscoder.net>
Date:   Sun Nov 24 19:31:01 2013 +0100

    [TASK] Switch to namespaces

commit 3878c943a6eb0924bb6db2e5ed8461580896431f
Author: Claus Due <*****@namelesscoder.net>
Date:   Tue Dec 10 01:59:34 2013 +0100

    [TASK] Update copyright and author tags
    
    Assumes "Claus Due" as author whenever no author is specified.

commit 8bf2b5beb89c7d72a41230f152d9a5a3d308ba84
Author: Claus Due <*****@namelesscoder.net>
Date:   Tue Dec 31 23:11:00 2013 +0100

    [TASK] Happy new year!