Documentation · ViewHelper reference

XSD schema file | vhs master

Render / RecordViewHelper

ViewHelper used to render raw content records typically fetched with <v:content.get(column: '0', render: FALSE) />.

If you simply want to render a content element, try <v:content.render>. /

  • Tag usage example

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

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

Arguments

Argument Description Type
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 total number of records to render

integer
loadRegister

List of LOAD_REGISTER variable

array
order

Optional sort field of content elements - RAND() supported. Note that when sliding is enabled, the sorting will be applied to records on a per-page basis and not to the total set of collected records.

string
pageUid

If set, selects only content from this page UID

integer
record

Record to render

array
render

Render result

boolean
sectionIndexOnly

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

boolean
slide

Enables Record Sliding - amount of levels which shall get walked up the rootline, including the current page. For infinite sliding (till the rootpage) set to -1. Only the first PID which has at minimum one record is used

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 records 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 60043c364c59e2710ddcc610770a3d89ff4677a4
Author: Björn Fromme <*****@bjo3rn.com>
Date:   Fri Jan 3 12:21:32 2014 +0100

    [FEATURE] Add viewhelper to render tt_content records

commit 52bd6e41ccfef3d8193b350153912a9716e6a087
Author: Benjamin Rau <*****@codearts.at>
Date:   Tue Apr 1 21:09:00 2014 +0200

    [TASK] CGL compliance

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

    [TASK] Switch to namespaces

commit 12ff0ddfb8d36c51f2d3befde7ae812177c80d5d
Author: Xaver Maierhofer <*****@xwissen.info>
Date:   Wed Jun 11 00:01:47 2014 +0200

    [TASK] CGL remove use leading backslash
    PHP Docs
    Note that for namespaced names (fully qualified namespace names containing namespace separator, such as Foo\Bar as opposed to global names that do not, such as FooBar),
    the leading backslash is unnecessary and not recommended, as import names must be fully qualified, and are not processed relative to the current namespace.

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