This is a collection of ViewHelpers for performing rendering tasks that are not
natively provided by TYPO3's Fluid templating engine.
These include advanced formatters, mathematical calculators, special conditions,
and iterators and array calculators and processors.
The extension needs to be installed as any other extension of TYPO3 CMS. Get the
extension by one of the following methods:
Use composer: Run
composer require fluidtypo3/vhs
Copied!
in your TYPO3 installation.
Get it from the Extension Manager: Switch to the module Admin Tools > Extensions.
Switch to Get Extensions and search for the extension key
vhs and import the extension from the repository.
Get it from typo3.org: You can always get current version from TER
by downloading the zip version. Upload the file afterwards in the Extension
Manager.
Configuration
Although there are no static TypoScript files which can be included, VHS does
support a few key settings which are defined in TypoScript:
Debug settings
plugin.tx_vhs.settings.debug = 1 can be used to enable general debugging,
which causes Asset inclusions to be debugged right before inclusion in the
page.
plugin.tx_vhs.settings.asset.debug = 1 can be used to enable debug output
from individual Asset ViewHelper instances. Applies when a ViewHelper uses the
"debug" parameter (where this is supported) and/or when
plugin.tx_vhs.settings.debug = 1.
plugin.tx_vhs.settings.useDebugUtility which causes VHS to use Extbase's
DebugUtility to dump variables. If this setting is not defined a value of 1
is assumed.
Usage
These are uses that deserve a special mention. The complete compendium of
ViewHelpers can be found on the view-helpers pages.
VHS includes a very useful feature that allows you to define assets (CSS,
JavaScript, etc.) in Fluid templates, PHP, and TypoScript. The traditional way
of including such assets in Fluid or elsewhere was that they were all used and
controlled differently and, probably worst of all, they were not all integration
friendly as assets could be modified with TypoScript. VHS Assets solves all
of these drawbacks.
$asset = \FluidTYPO3\Vhs\Asset::getInstance();
// or alternatively, if this fits better in your other code:
$asset = $objectManager->get('FluidTYPO3\\Vhs\\Asset');
// then:
$asset->setName('demo');
$asset->setPath('fileadmin/demo.js');
$asset->finalize(); // manually created Assets must be finalized before they show up.
Copied!
The PHP call above does the exact same as this TypoScript:
plugin.tx_vhs.settings.asset.demo {
name = demo
path = fileadmin/demo.js
}
Copied!
In summary: Regardless of where and how you use VHS Assets, they always use the
same attributes, they always behave the same, support the same features (such as
dependency on other assets regardless of inclusion order and addressing assets
by a group name to affect multiple assets - and even rendering JavaScript and
CSS as if the file was a Fluid template).
The API for inclusion changes but the result is the same.
But the real benefit of VHS Assets comes in the form of the TypoScript
integration, which lets you override settings of individual assets (regardless
of how they were originally defined - Fluid, PHP, TypoScript) by setting their
attributes in TypoScript. This allows integrators to control every aspect of
every asset (but not the ones included in traditional ways) all the way down to
replacing the script source or CSS content that gets inserted or moving
JavaScript file(s) which used to be merged, to a new CDN server without even
breaking dependencies and execution order.
To affect VHS Assets through TypoScript, the following settings can be used:
Asset settings
plugin.tx_vhs.settings.asset.ASSETNAME {
content = Text # Text which overrides content
path = FileReference # If set, turns Asset into a file inclusion
name = Text a-zA-Z0-9_ # Can be used to change the name of an Asset on-the-fly, but watch out for dependencies
external = Integer 0/1 # If set to `1` and `standalone`, includes the file as raw URL. If set to `1` and not `standalone` then downloads the file and merges it when building Assets
overwrite = Integer 0/1 # If set to `1` this Asset is permitted to overwrite existing, identically named Assets
dependencies = CSV # list of comma-separated Asset names upon which the current Asset depends; affects loading order
group = Text a-zA-Z0-9_ # Group name, default "fluid". By grouping Assets the settings used on the group will apply to Assets
debug = Integer 0/1 # If `1` enables debug output of each asset
standalone = Integer 0/1 # If `1` instructs VHS to process this Asset as standalone, excluding it from merging
async = Integer 0/1 # If 1, adds "async" attribute to script tag (only works when standalone is set and type is js)
defer = Integer 0/1 # If 1, adds "defer" attribute to script tag (only works when standalone is set and type is js)
movable = Integer 0/1 # If `0` prevents Assets from being included in the page footer. Used by style-type Assets. Default is `1` unless type is CSS which forces movable=0
trim = Integer 0/1 # If `1` enables trimming of whitespace from beginning and end of lines when merging Assets
namedChunks = Integer 0/1 # If `0` prevents Asset name from being inserted as comment above the Asset body in merged files
}
plugin.tx_vhs.settings.assetGroup.ASSETGROUPNAME {
# this object supports the following properties only. When applied to a group the settings are used by each# Asset in that group, unless overridden directly in the Asset's attributes or through TypoScript as above.# SUPPORTED PROPERTIES: overwrite, dependencies, group, debug, standalone, allowMoveToFooter, trim and namedChunks# Please note: changing the "group" property changes the name of the group which means another group configuration# must be added which configures that group. Otherwise settings may be ignored.
}
plugin.tx_vhs.settings.asset {
# this object supports every property which "assetGroup" supports except for the "group" and "dependencies" properties.
}
plugin.tx_vhs.assets {
mergedAssetsUseHashedFilename = 0 # If set to a 1, Assets are merged into a file named using a hash if Assets' names.
tagsAddSubresourceIntegrity = 0 # If set to 1 (weakest),2 or 3 (strongest), Vhs will generate and add the Subresource Integrity (SRI) for every included Asset.
}
Copied!
Secondary domain name for resources
You can configure VHS to write path prepends in two ways, one of which allows
you to create a so-called "cookie-free domain" on which requests will contain
fewer headers. Normally, defining config.absRefPrefix causes your resources'
paths to be prefixed with a domain, but using this approach will always prepend
a domain name which cannot be "cookie-free". VHS allows an alternative setting
for path prefix, which can be set to a secondary domain name (pointing to the
same virtual host or not) which sets no cookies, causing all asset tags to be
written with this prefix prepended:
The setting affects every relative path resource ViewHelper (NB: this does not
include links!) in VHS, which is why it is not placed inside the "asset" scope.
If you need to output this prefix path in templates, you can use the v:page.staticPrefix
ViewHelper - It accepts no arguments and only outputs the setting if it is set.
For example, using f:image will not prefix the image path but manually
creating an <img /> tag and using f:uri.image as src argument will allow
you to prefix the path.
Places the contents of the asset (the tag body) directly
in the additional header content of the page. This most
basic possible version of an Asset has only the core
features shared by every Asset type:
a "name" attribute which is required, identifying the Asset
by a lowerCamelCase or lowercase_underscored value, your
preference (but lowerCamelCase recommended for consistency).
a "dependencies" attribute with a CSV list of other named
Assets upon which the current Asset depends. When used, this
Asset will be included after every asset listed as dependency.
a "group" attribute which is optional and is used ty further
identify the Asset as belonging to a particular group which
can be suppressed or manipulated through TypoScript. For
example, the default value is "fluid" and if TypoScript is
used to exclude the group "fluid" then any Asset in that
group will simply not be loaded.
an "overwrite" attribute which if enabled causes any existing
asset with the same name to be overwritten with the current
Asset instead. If rendered in a loop only the last instance
is actually used (this allows Assets in Partials which are
rendered in an f:for loop).
a "debug" property which enables output of the information
used by the current Asset, with an option to force debug
mode through TypoScript.
additional properties which affect how the Asset is processed.
For a full list see the argument descriptions; the same
settings can be applied through TypoScript per-Asset, globally
or per-Asset-group.
Note: there are no static TypoScript templates for VHS but
you will find a complete list in the README.md file in the
root of the extension folder.
Arguments
content
DataType
string
Required
false
Description
Content to insert in header/footer
path
DataType
string
Required
false
Description
If not using tag content, specify path to file here
external
DataType
boolean
Required
false
Description
If TRUE and standalone, includes the file as raw URL. If TRUE and not standalone then downloads the file and merges it when building Assets
name
DataType
string
Required
false
Description
Optional name of the content. If multiple occurrences of the same name happens, behavior is defined by argument "overwrite"
overwrite
DataType
boolean
Default
true
Required
false
Description
If set to FALSE and a relocated string with "name" already exists, does not overwrite the existing relocated string. Default behavior is to overwrite.
dependencies
DataType
string
Required
false
Description
CSV list of other named assets upon which this asset depends. When included, this asset will always load after its dependencies
group
DataType
string
Default
'fluid'
Required
false
Description
Optional name of a logical group (created dynamically just by using the name) to which this particular asset belongs.
debug
DataType
boolean
Required
false
Description
If TRUE, outputs information about this ViewHelper when the tag is used. Two master debug switches exist in TypoScript; see documentation about Page / Asset ViewHelper
standalone
DataType
boolean
Default
true
Required
false
Description
If TRUE, excludes this Asset from any concatenation which may be applied
rewrite
DataType
boolean
Default
true
Required
false
Description
If FALSE, this Asset will be included as is without any processing of contained urls
fluid
DataType
boolean
Required
false
Description
If TRUE, renders this (standalone or external) Asset as if it were a Fluid template, passing along values of the "variables" attribute or every available template variable if "variables" not specified
variables
DataType
mixed
Required
false
Description
An optional array of arguments which you use inside the Asset, be it standalone or inline. Use this argument to ensure your Asset filenames are only reused when all variables used in the Asset are the same
movable
DataType
boolean
Default
true
Required
false
Description
If TRUE, allows this Asset to be included in the document footer rather than the header. Should never be allowed for CSS.
trim
DataType
boolean
Required
false
Description
DEPRECATED. Trim is no longer supported. Setting this to TRUE doesn't do anything.
namedChunks
DataType
boolean
Required
false
Description
If FALSE, hides the comment containing the name of each of Assets which is merged in a merged file. Disable to avoid a bit more output at the cost of transparency
call ViewHelper <vhs:call>
Call ViewHelper
Calls a method on an existing object. Usable as inline or tag.
Examples
<!-- inline, useful as argument, for example in f:for -->
{object -> v:call(method: 'toArray')}
<!-- tag, useful to quickly output simple values -->
<v:call object="{object}" method="unconventionalGetter" />
<v:call method="unconventionalGetter">{object}</v:call>
<!-- arguments for the method -->
<v:call object="{object}" method="doSomethingWithArguments" arguments="{0: 'foo', 1: 'bar'}" />
Copied!
Arguments
object
DataType
mixed
Required
false
Description
Instance to call method on
method
DataType
string
Required
true
Description
Name of method to call on instance
arguments
DataType
mixed
Default
array ()
Required
false
Description
Array of arguments if method requires arguments
const ViewHelper <vhs:const>
Const ViewHelper
Renders the value of a PHP constant
Arguments
name
DataType
string
Required
false
Description
Name of constant to retrieve
debug ViewHelper <vhs:debug>
ViewHelper Debug ViewHelper (sic)
Debugs instances of other ViewHelpers and language
structures. Use in conjunction with other ViewHelpers
to inspect their current and possible arguments and
render their documentation:
Can also be used to inspect ObjectAccessor instances
(e.g. variables you try to access) and rather than just
dumping the entire contents of the variable as is done
by <f:debug />, this ViewHelper makes a very simple
dump with a warning if the variable is not defined. If
an object is encountered (for example a domain object)
this ViewHelper will not dump the object but instead
will scan it for accessible properties (e.g. properties
which have a getter method!) and only present those
properties which can be accessed, along with the type
of variable that property currently contains:
{domainObject -> v:debug()}
Copied!
Assuming that {domainObject} is an instance of an
object which has two methods: getUid() and getTitle(),
debugging that instance will render something like this
in plain text:
Path: {domainObject}
Value type: object
Accessible properties on {domainObject}:
{form.uid} (integer)
{form.title} (string)
Copied!
The class itself can contain any number of protected
properties, but only those which have a getter method
can be accessed by Fluid and as therefore we only dump
those properties which you can in fact access.
Arguments
This ViewHelper has no arguments.
l ViewHelper <vhs:l>
L (localisation) ViewHelper
An extremely shortened and much more dev-friendly
alternative to f:translate. Automatically outputs
the name of the LLL reference if it is not found
and the default value is not set, making it much
easier to identify missing labels when translating.
If the given locallang key could not be found, this value is used. If this argument is not set, child nodes will be used to render the default
htmlEscape
DataType
boolean
Required
false
Description
TRUE if the result should be htmlescaped. This won't have an effect for the default value
arguments
DataType
mixed
Required
false
Description
Arguments to be replaced in the resulting string
extensionName
DataType
string
Required
false
Description
UpperCamelCased extension key (for example BlogExample)
menu ViewHelper <vhs:menu>
Page: Menu ViewHelper
ViewHelper for rendering TYPO3 menus in Fluid
Supports both automatic, tag-based rendering (which
defaults to ul > li with options to set both the
parent and child tag names. When using manual rendering
a range of support CSS classes are available along
with each page record.
Arguments
additionalAttributes
DataType
mixed
Required
false
Description
Additional tag attributes. They will be added directly to the resulting HTML tag.
data
DataType
mixed
Required
false
Description
Additional data-* attributes. They will each be added with a "data-" prefix.
aria
DataType
mixed
Required
false
Description
Additional aria-* attributes. They will each be added with a "aria-" prefix.
class
DataType
string
Required
false
Description
CSS class(es) for this element
dir
DataType
string
Required
false
Description
Text direction for this HTML element. Allowed strings: "ltr" (left to right), "rtl" (right to left)
id
DataType
string
Required
false
Description
Unique (in this file) identifier for this HTML element.
lang
DataType
string
Required
false
Description
Language for this element. Use short names specified in RFC 1766
style
DataType
string
Required
false
Description
Individual CSS styles for this element
title
DataType
string
Required
false
Description
Tooltip text of element
accesskey
DataType
string
Required
false
Description
Keyboard shortcut to access this element
tabindex
DataType
integer
Required
false
Description
Specifies the tab order of this element
onclick
DataType
string
Required
false
Description
JavaScript evaluated for the onclick event
forceClosingTag
DataType
boolean
Required
false
Description
If TRUE, forces the created tag to use a closing tag. If FALSE, allows self-closing tags.
hideIfEmpty
DataType
boolean
Required
false
Description
Hide the tag completely if there is no tag content
contenteditable
DataType
string
Required
false
Description
Specifies whether the contents of the element are editable.
contextmenu
DataType
string
Required
false
Description
The value of the id attribute on the menu with which to associate the element as a context menu.
draggable
DataType
string
Required
false
Description
Specifies whether the element is draggable.
dropzone
DataType
string
Required
false
Description
Specifies what types of content can be dropped on the element, and instructs the UA about which actions to take with content when it is dropped on the element.
translate
DataType
string
Required
false
Description
Specifies whether an elements attribute values and contents of its children are to be translated when the page is localized, or whether to leave them unchanged.
spellcheck
DataType
string
Required
false
Description
Specifies whether the element represents an element whose contents are subject to spell checking and grammar checking.
hidden
DataType
string
Required
false
Description
Specifies that the element represents an element that is not yet, or is no longer, relevant.
showAccessProtected
DataType
boolean
Required
false
Description
If TRUE links to access protected pages are always rendered regardless of user login status
classAccessProtected
DataType
string
Default
'protected'
Required
false
Description
Optional class name to add to links which are access protected
classAccessGranted
DataType
string
Default
'access-granted'
Required
false
Description
Optional class name to add to links which are access protected but access is actually granted
useShortcutUid
DataType
boolean
Required
false
Description
If TRUE, substitutes the link UID of a shortcut with the target page UID (and thus avoiding redirects) but does not change other data - which is done by using useShortcutData.
useShortcutTarget
DataType
boolean
Required
false
Description
Optional param for using shortcut target instead of shortcut itself for current link
useShortcutData
DataType
boolean
Required
false
Description
Shortcut to set useShortcutTarget and useShortcutData simultaneously
tagName
DataType
string
Default
'ul'
Required
false
Description
Tag name to use for enclosing container
tagNameChildren
DataType
string
Default
'li'
Required
false
Description
Tag name to use for child nodes surrounding links. If set to "a" enables non-wrapping mode.
entryLevel
DataType
integer
Required
false
Description
Optional entryLevel TS equivalent of the menu
levels
DataType
integer
Default
1
Required
false
Description
Number of levels to render - setting this to a number higher than 1 (one) will expand menu items that are active, to a depth of $levels starting from $entryLevel
expandAll
DataType
boolean
Required
false
Description
If TRUE and $levels > 1 then expands all (not just the active) menu items which have submenus
classFirst
DataType
string
Required
false
Description
Optional class name for the first menu elment
classLast
DataType
string
Required
false
Description
Optional class name for the last menu elment
classActive
DataType
string
Default
'active'
Required
false
Description
Optional class name to add to active links
classCurrent
DataType
string
Default
'current'
Required
false
Description
Optional class name to add to current link
substElementUid
DataType
boolean
Required
false
Description
Optional parameter for wrapping the link with the uid of the page
showHiddenInMenu
DataType
boolean
Required
false
Description
Include pages that are set to be hidden in menus
showCurrent
DataType
boolean
Default
true
Required
false
Description
If FALSE, does not display the current page
linkCurrent
DataType
boolean
Default
true
Required
false
Description
If FALSE, does not wrap the current page in a link
linkActive
DataType
boolean
Default
true
Required
false
Description
If FALSE, does not wrap with links the titles of pages that are active in the rootline
titleFields
DataType
string
Default
'nav_title,title'
Required
false
Description
CSV list of fields to use as link label - default is "nav_title,title", change to for example "tx_myext_somefield,subtitle,nav_title,title". The first field that contains text will be used. Field value resolved AFTER page field overlays.
includeAnchorTitle
DataType
boolean
Default
true
Required
false
Description
If TRUE, includes the page title as title attribute on the anchor.
includeSpacers
DataType
boolean
Required
false
Description
Wether or not to include menu spacers in the page select query
deferred
DataType
boolean
Required
false
Description
If TRUE, does not output the tag content UNLESS a v:page.menu.deferred child ViewHelper is both used and triggered. This allows you to create advanced conditions while still using automatic rendering
as
DataType
string
Default
'menu'
Required
false
Description
If used, stores the menu pages as an array in a variable named after this value and renders the tag content. If the tag content is empty automatic rendering is triggered.
rootLineAs
DataType
string
Default
'rootLine'
Required
false
Description
If used, stores the menu root line as an array in a variable named according to this value and renders the tag content - which means automatic rendering is disabled if this attribute is used
excludePages
DataType
mixed
Required
false
Description
Page UIDs to exclude from the menu. Can be CSV, array or an object implementing Traversable.
forceAbsoluteUrl
DataType
boolean
Required
false
Description
If TRUE, the menu will be rendered with absolute URLs
doktypes
DataType
mixed
Required
false
Description
DEPRECATED: Please use typical doktypes for starting points like shortcuts.
divider
DataType
string
Required
false
Description
Optional divider to insert between each menu item. Note that this does not mix well with automatic rendering due to the use of an ul > li structure
pageUid
DataType
integer
Required
false
Description
Optional parent page UID to use as top level of menu. If left out will be detected from rootLine using $entryLevel
or ViewHelper <vhs:or>
If content is empty use alternative text (can also be LLL:labelname shortcut or LLL:EXT: file paths).
Arguments
content
DataType
mixed
Required
false
Description
Input to either use, if not empty
alternative
DataType
mixed
Required
false
Description
Alternative if content is empty, can use LLL: shortcut
arguments
DataType
mixed
Required
false
Description
Arguments to be replaced in the resulting string
extensionName
DataType
string
Required
false
Description
UpperCamelCase extension name without vendor prefix
tag ViewHelper <vhs:tag>
Tag building ViewHelper
Creates one HTML tag of any type, with various properties
like class and ID applied only if arguments are not empty,
rather than apply them always - empty or not - if provided.
Arguments
additionalAttributes
DataType
mixed
Required
false
Description
Additional tag attributes. They will be added directly to the resulting HTML tag.
data
DataType
mixed
Required
false
Description
Additional data-* attributes. They will each be added with a "data-" prefix.
aria
DataType
mixed
Required
false
Description
Additional aria-* attributes. They will each be added with a "aria-" prefix.
class
DataType
string
Required
false
Description
CSS class(es) for this element
dir
DataType
string
Required
false
Description
Text direction for this HTML element. Allowed strings: "ltr" (left to right), "rtl" (right to left)
id
DataType
string
Required
false
Description
Unique (in this file) identifier for this HTML element.
lang
DataType
string
Required
false
Description
Language for this element. Use short names specified in RFC 1766
style
DataType
string
Required
false
Description
Individual CSS styles for this element
title
DataType
string
Required
false
Description
Tooltip text of element
accesskey
DataType
string
Required
false
Description
Keyboard shortcut to access this element
tabindex
DataType
integer
Required
false
Description
Specifies the tab order of this element
onclick
DataType
string
Required
false
Description
JavaScript evaluated for the onclick event
forceClosingTag
DataType
boolean
Required
false
Description
If TRUE, forces the created tag to use a closing tag. If FALSE, allows self-closing tags.
hideIfEmpty
DataType
boolean
Required
false
Description
Hide the tag completely if there is no tag content
contenteditable
DataType
string
Required
false
Description
Specifies whether the contents of the element are editable.
contextmenu
DataType
string
Required
false
Description
The value of the id attribute on the menu with which to associate the element as a context menu.
draggable
DataType
string
Required
false
Description
Specifies whether the element is draggable.
dropzone
DataType
string
Required
false
Description
Specifies what types of content can be dropped on the element, and instructs the UA about which actions to take with content when it is dropped on the element.
translate
DataType
string
Required
false
Description
Specifies whether an elements attribute values and contents of its children are to be translated when the page is localized, or whether to leave them unchanged.
spellcheck
DataType
string
Required
false
Description
Specifies whether the element represents an element whose contents are subject to spell checking and grammar checking.
hidden
DataType
string
Required
false
Description
Specifies that the element represents an element that is not yet, or is no longer, relevant.
name
DataType
string
Required
true
Description
Tag name
try ViewHelper <vhs:try>
Try ViewHelper
Attempts to render child content. If an Exception is encountered
while rendering, instead the f:else child node is rendered,
if it is present. If f:else is not used, no output is returned.
Can be used to perform complex translations of Exception messages
which can occur. Can naturally also be used to provide a great
deal of additional information about every possible Exception-type
error which Fluid can encounter (and there are many).
Note that this is a Condition ViewHelper which means you can use
the f:then child node but it differs from regular Conditions by
also allowing the template developer to skip the f:then child
node and use the direct tag content as the "TRUE" condition and
add an f:else which is only rendered in case of an Exception
during rendering.
Also note that you can use the then and else attributes; the
then attribute is what is attempted rendered and the else
attribute is what is rendered if retrieving the then attribute's
value fails. Which clearly only makes sense if for example complex
inline ViewHelpers are used in the attributes.
Example usage
Please note that this is a theoretical example!
The example is theoretical in one major aspect: v:format.json.decode
throws an Exception which Fluid displays as a string always - abstract
from this and imagine that a plain Exception happens on errors.
<v:try>
<!-- assume that the variable {badJson} contains the string "DontDecodeMe"
which if course is invalid JSON and cannot be decoded. The default
behavior is to simply output a simple "cannot decode" string. -->
<v:variable.set name="decodedBadJson" value="{badJson -> v:format.json.decode()}" />
Displayed only if the JSON decode worked. Much more code and many more
ViewHelpers can go here. Now, imagine that this block spans so much code
that potentially there could come an Exception from many additional places
(for example from Widgets) and you cannot be sure where the Exception comes
from but still want to tell the user what exactly went wrong and provide
an error code which makes sense to send to developers if problems persist:
<f:else>
<h4>
Error in "{exception.trace.0.class
-> v:iterator.explode(glue: '_')
-> v:iterator.pop()
-> v:format.replace(substring: 'ViewHelper', replacement: ''}"
<small>{exception.code}</small>
<!-- Output example: "Error in Decode <small>1358440054</small>" -->
</h4>
<p>
{exception.message}
<!-- Output example: "The provided argument is invalid JSON" -->
</p>
<pre>
Value: ``{exception.trace.0.args.0}
<!-- Output example: "Value: ``DontDecodeMe" which is quite nice
for developers to know as part of a bug report from users. -->
</pre>
</f:else>
</v:try>
Copied!
...or if you want a shorter version...
<!-- Tries to encode an object, if it fails, falls back by returning a proper JSON
value, thus preventing breakage by the JSON consumer whatever it may be. -->
{v:try(then: '{badObject -> v:format.json.encode()}', else: '{"validJson": "validValue"')}
<!-- Note: be VERY careful about the inline JSON syntax! It's very close to Fluids. Always
double quote your object variables' names, that prevents almost all issues! -->
Copied!
Arguments
as
DataType
string
Required
false
Description
Template variable name to assign; if not specified the ViewHelper returns the variable instead.
unless ViewHelper <vhs:unless>
Unless
The opposite of f:if and only supporting negative matching.
Related to v:or but allows more complex conditions.
Is the same as writing:
<f:if condition="{theThingToCheck}">
<f:else>
The thing that gets done
</f:else>
</f:if>
Copied!
Except without the f:else.
Example, tag mode
<v:unless condition="{somethingRequired}">
Warning! Something required was not present.
</v:unless>
Copied!
Example, inline mode illustrating v:or likeness
{defaultText -> v:unless(condition: originalText)}
// which is much the same as...
{originalText -> v:or(alternative: defaultText}
// ...but the "unless" counterpart supports anything as
// condition instead of only checking "is content empty?"
Enables the special <link rel="dns-prefetch" /> tag
which instructs the browser to start prefetching DNS
records for every domain listed in the domains attribute
of this ViewHelper. Prefetching starts as soon as the browser
becomes aware of the tag - to optimise even further, you may
wish to control the output buffer's size to deliver your site
HTML in chunks, the first chunk being the one containing this
ViewHelper.
Note that the web server daemon may send headers which prevent
this prefetching and that these headers can be added in many
ways. If prefetching does not work, you will need to inspect
the HTTP headers returned from the actual environment. Or you
may prefer to simply add force="TRUE" to this tag - but
beware that this will affect the entire document's behaviour,
not just for this particular set of domain prefetches. Once
force-enabled this setting cannot be disabled (unless done so
by manually adding an additional meta header tag as examplified
by the build() method.
If not using tag content, specify path to file here
external
DataType
boolean
Required
false
Description
If TRUE and standalone, includes the file as raw URL. If TRUE and not standalone then downloads the file and merges it when building Assets
name
DataType
string
Required
false
Description
Optional name of the content. If multiple occurrences of the same name happens, behavior is defined by argument "overwrite"
overwrite
DataType
boolean
Default
true
Required
false
Description
If set to FALSE and a relocated string with "name" already exists, does not overwrite the existing relocated string. Default behavior is to overwrite.
dependencies
DataType
string
Required
false
Description
CSV list of other named assets upon which this asset depends. When included, this asset will always load after its dependencies
group
DataType
string
Default
'fluid'
Required
false
Description
Optional name of a logical group (created dynamically just by using the name) to which this particular asset belongs.
debug
DataType
boolean
Required
false
Description
If TRUE, outputs information about this ViewHelper when the tag is used. Two master debug switches exist in TypoScript; see documentation about Page / Asset ViewHelper
standalone
DataType
boolean
Required
false
Description
If TRUE, excludes this Asset from any concatenation which may be applied
rewrite
DataType
boolean
Default
true
Required
false
Description
If FALSE, this Asset will be included as is without any processing of contained urls
fluid
DataType
boolean
Required
false
Description
If TRUE, renders this (standalone or external) Asset as if it were a Fluid template, passing along values of the "variables" attribute or every available template variable if "variables" not specified
variables
DataType
mixed
Required
false
Description
An optional array of arguments which you use inside the Asset, be it standalone or inline. Use this argument to ensure your Asset filenames are only reused when all variables used in the Asset are the same
movable
DataType
boolean
Default
true
Required
false
Description
If TRUE, allows this Asset to be included in the document footer rather than the header. Should never be allowed for CSS.
trim
DataType
boolean
Required
false
Description
DEPRECATED. Trim is no longer supported. Setting this to TRUE doesn't do anything.
namedChunks
DataType
boolean
Required
false
Description
If FALSE, hides the comment containing the name of each of Assets which is merged in a merged file. Disable to avoid a bit more output at the cost of transparency
domains
DataType
mixed
Required
true
Description
Domain DNS names to prefetch. By default will add all sys_domain record DNS names
protocol
DataType
string
Required
false
Description
Optional value of protocol as inserted in the resulting HREF value. If you experience problems with a non-protocol link, try enforcing http/https here
protocolSeparator
DataType
string
Default
'//'
Required
false
Description
If you do not enforce a particular protocol and wish to remove the double slashes from the hostname (your browser may not understand this!), set this attribute to an empty value (not-zero)
force
DataType
boolean
Required
false
Description
If TRUE, adds an additional meta header tag which forces prefetching to be enabled even if otherwise requested by the http daemon
asset.script ViewHelper <vhs:asset.script>
Basic Script ViewHelper
Allows inserting a <script> Asset. Settings specify
where to insert the Asset and how to treat it.
Arguments
content
DataType
string
Required
false
Description
Content to insert in header/footer
path
DataType
string
Required
false
Description
If not using tag content, specify path to file here
external
DataType
boolean
Required
false
Description
If TRUE and standalone, includes the file as raw URL. If TRUE and not standalone then downloads the file and merges it when building Assets
name
DataType
string
Required
false
Description
Optional name of the content. If multiple occurrences of the same name happens, behavior is defined by argument "overwrite"
overwrite
DataType
boolean
Default
true
Required
false
Description
If set to FALSE and a relocated string with "name" already exists, does not overwrite the existing relocated string. Default behavior is to overwrite.
dependencies
DataType
string
Required
false
Description
CSV list of other named assets upon which this asset depends. When included, this asset will always load after its dependencies
group
DataType
string
Default
'fluid'
Required
false
Description
Optional name of a logical group (created dynamically just by using the name) to which this particular asset belongs.
debug
DataType
boolean
Required
false
Description
If TRUE, outputs information about this ViewHelper when the tag is used. Two master debug switches exist in TypoScript; see documentation about Page / Asset ViewHelper
standalone
DataType
boolean
Required
false
Description
If TRUE, excludes this Asset from any concatenation which may be applied
rewrite
DataType
boolean
Default
true
Required
false
Description
If FALSE, this Asset will be included as is without any processing of contained urls
fluid
DataType
boolean
Required
false
Description
If TRUE, renders this (standalone or external) Asset as if it were a Fluid template, passing along values of the "variables" attribute or every available template variable if "variables" not specified
variables
DataType
mixed
Required
false
Description
An optional array of arguments which you use inside the Asset, be it standalone or inline. Use this argument to ensure your Asset filenames are only reused when all variables used in the Asset are the same
movable
DataType
boolean
Default
true
Required
false
Description
If TRUE, allows this Asset to be included in the document footer rather than the header. Should never be allowed for CSS.
trim
DataType
boolean
Required
false
Description
DEPRECATED. Trim is no longer supported. Setting this to TRUE doesn't do anything.
namedChunks
DataType
boolean
Required
false
Description
If FALSE, hides the comment containing the name of each of Assets which is merged in a merged file. Disable to avoid a bit more output at the cost of transparency
async
DataType
boolean
Required
false
Description
If TRUE, adds "async" attribute to script tag (only works when standalone is set)
defer
DataType
boolean
Required
false
Description
If TRUE, adds "defer" attribute to script tag (only works when standalone is set)
asset.style ViewHelper <vhs:asset.style>
Basic Style ViewHelper
Allows inserting a <link> or <style> Asset. Settings
specify where to insert the Asset and how to treat it.
Arguments
content
DataType
string
Required
false
Description
Content to insert in header/footer
path
DataType
string
Required
false
Description
If not using tag content, specify path to file here
external
DataType
boolean
Required
false
Description
If TRUE and standalone, includes the file as raw URL. If TRUE and not standalone then downloads the file and merges it when building Assets
name
DataType
string
Required
false
Description
Optional name of the content. If multiple occurrences of the same name happens, behavior is defined by argument "overwrite"
overwrite
DataType
boolean
Default
true
Required
false
Description
If set to FALSE and a relocated string with "name" already exists, does not overwrite the existing relocated string. Default behavior is to overwrite.
dependencies
DataType
string
Required
false
Description
CSV list of other named assets upon which this asset depends. When included, this asset will always load after its dependencies
group
DataType
string
Default
'fluid'
Required
false
Description
Optional name of a logical group (created dynamically just by using the name) to which this particular asset belongs.
debug
DataType
boolean
Required
false
Description
If TRUE, outputs information about this ViewHelper when the tag is used. Two master debug switches exist in TypoScript; see documentation about Page / Asset ViewHelper
standalone
DataType
boolean
Required
false
Description
If TRUE, excludes this Asset from any concatenation which may be applied
rewrite
DataType
boolean
Default
true
Required
false
Description
If FALSE, this Asset will be included as is without any processing of contained urls
fluid
DataType
boolean
Required
false
Description
If TRUE, renders this (standalone or external) Asset as if it were a Fluid template, passing along values of the "variables" attribute or every available template variable if "variables" not specified
variables
DataType
mixed
Required
false
Description
An optional array of arguments which you use inside the Asset, be it standalone or inline. Use this argument to ensure your Asset filenames are only reused when all variables used in the Asset are the same
movable
DataType
boolean
Required
false
Description
If TRUE, allows this Asset to be included in the document footer rather than the header. Should never be allowed for CSS.
trim
DataType
boolean
Required
false
Description
DEPRECATED. Trim is no longer supported. Setting this to TRUE doesn't do anything.
namedChunks
DataType
boolean
Required
false
Description
If FALSE, hides the comment containing the name of each of Assets which is merged in a merged file. Disable to avoid a bit more output at the cost of transparency
Returns true if current root application context is development otherwise false.
If no application context has been set, then the default context is production.
Note about how to set the application context
The context TYPO3 CMS runs in is specified through the environment variable TYPO3_CONTEXT.
It can be set by .htaccess or in the server configuration
A condition ViewHelper which renders the then child if
current context being rendered is FE.
Examples
<!-- simple usage, content becomes then-child -->
<v:condition.context.isFrontend>
Hooray for BE contexts!
</v:condition.context.isFrontend>
<!-- extended use combined with f:then and f:else -->
<v:condition.context.isFrontend>
<f:then>
Hooray for BE contexts!
</f:then>
<f:else>
Maybe BE, maybe CLI.
</f:else>
</v:condition.context.isFrontend>
Returns true if current root application context is production otherwise false.
If no application context has been set, then this is the default context.
Note about how to set the application context
The context TYPO3 CMS runs in is specified through the environment variable TYPO3_CONTEXT.
It can be set by .htaccess or in the server configuration
Returns true if current root application context is testing otherwise false.
If no application context has been set, then the default context is production.
Note about how to set the application context
The context TYPO3 CMS runs in is specified through the environment variable TYPO3_CONTEXT.
It can be set by .htaccess or in the server configuration
A condition ViewHelper which renders the then child if
current page or page with provided UID has subpages. By default
disabled subpages are considered non existent which can be overridden
by setting $includeHidden to TRUE. To include pages that are hidden
in menus set $showHiddenInMenu to TRUE.
Condition ViewHelper which renders the then child if current
page or page with provided UID is a child of some other page in
the page tree. If $respectSiteRoot is set to TRUE root pages are
never considered child pages even if they are.
A condition ViewHelper which renders the then child if
current language matches the provided language uid or language
title. When using language titles like 'de' it is required to
provide a default title to distinguish between the standard
and a non existing language.
Condition ViewHelper which renders the then child if provided
string is lowercase. By default only the first letter is tested.
To test the full string set $fullString to TRUE.
Condition ViewHelper which renders the then child if provided
string is uppercase. By default only the first letter is tested.
To test the full string set $fullString to TRUE.
Renders the then child if the variable name given in
the name argument exists in the template. The value
can be zero, NULL or an empty string - but the ViewHelper
will still return TRUE if the variable exists.
Combines well with dynamic variable names:
<!-- if {variableContainingVariableName} is "foo" this checks existence of {foo} -->
<v:condition.variable.isset name="{variableContainingVariableName}">...</v:condition.variable.isset>
<!-- if {suffix} is "Name" this checks existence of "variableName" -->
<v:condition.variable.isset name="variable{suffix}">...</v:condition.variable.isset>
<!-- outputs value of {foo} if {bar} is defined -->
{foo -> v:condition.variable.isset(name: bar)}
ViewHelper used to render get content elements in Fluid templates
Does not work in the TYPO3 backend.
Arguments
column
DataType
integer
Required
false
Description
Column position number (colPos) of the column to render
order
DataType
string
Default
'sorting'
Required
false
Description
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.
sortDirection
DataType
string
Default
'ASC'
Required
false
Description
Optional sort direction of content elements
pageUid
DataType
integer
Required
false
Description
If set, selects only content from this page UID. Ignored when "contentUids" is specified.
contentUids
DataType
mixed
Required
false
Description
If used, replaces all conditions with an "uid IN (1,2,3)" style condition using the UID values from this array
sectionIndexOnly
DataType
boolean
Required
false
Description
If TRUE, only renders/gets content that is marked as "include in section index"
loadRegister
DataType
mixed
Required
false
Description
List of LOAD_REGISTER variable
render
DataType
boolean
Required
false
Description
Return rendered result
hideUntranslated
DataType
boolean
Required
false
Description
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
limit
DataType
integer
Required
false
Description
Optional limit to the total number of records to render
slide
DataType
integer
Required
false
Description
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.
slideCollect
DataType
integer
Required
false
Description
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.
slideCollectReverse
DataType
boolean
Required
false
Description
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.
content.info ViewHelper <vhs:content.info>
ViewHelper to access data of the current content element record.
Arguments
as
DataType
string
Required
false
Description
Template variable name to assign; if not specified the ViewHelper returns the variable instead.
contentUid
DataType
integer
Required
false
Description
If specified, this UID will be used to fetch content element data instead of using the current content element.
field
DataType
string
Required
false
Description
If specified, only this field will be returned/assigned instead of the complete content element record.
content.render ViewHelper <vhs:content.render>
ViewHelper used to render content elements in Fluid templates.
Render a single content element by its UID
Let's assume that the variable settings.element.uid contains the uid
of a content element.
It can be rendered as follows:
Column position number (colPos) of the column to render
order
DataType
string
Default
'sorting'
Required
false
Description
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.
sortDirection
DataType
string
Default
'ASC'
Required
false
Description
Optional sort direction of content elements
pageUid
DataType
integer
Required
false
Description
If set, selects only content from this page UID. Ignored when "contentUids" is specified.
contentUids
DataType
mixed
Required
false
Description
If used, replaces all conditions with an "uid IN (1,2,3)" style condition using the UID values from this array
sectionIndexOnly
DataType
boolean
Required
false
Description
If TRUE, only renders/gets content that is marked as "include in section index"
loadRegister
DataType
mixed
Required
false
Description
List of LOAD_REGISTER variable
render
DataType
boolean
Default
true
Required
false
Description
Render result
hideUntranslated
DataType
boolean
Required
false
Description
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
limit
DataType
integer
Required
false
Description
Optional limit to the total number of records to render
slide
DataType
integer
Required
false
Description
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.
slideCollect
DataType
integer
Required
false
Description
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.
slideCollectReverse
DataType
boolean
Required
false
Description
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.
as
DataType
string
Required
false
Description
Template variable name to assign; if not specified the ViewHelper returns the variable instead.
ViewHelper for fetching a random content element in Fluid page templates.
Arguments
column
DataType
integer
Required
false
Description
Column position number (colPos) of the column to render
order
DataType
string
Default
'sorting'
Required
false
Description
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.
sortDirection
DataType
string
Default
'ASC'
Required
false
Description
Optional sort direction of content elements
pageUid
DataType
integer
Required
false
Description
If set, selects only content from this page UID. Ignored when "contentUids" is specified.
contentUids
DataType
mixed
Required
false
Description
If used, replaces all conditions with an "uid IN (1,2,3)" style condition using the UID values from this array
sectionIndexOnly
DataType
boolean
Required
false
Description
If TRUE, only renders/gets content that is marked as "include in section index"
loadRegister
DataType
mixed
Required
false
Description
List of LOAD_REGISTER variable
render
DataType
boolean
Required
false
Description
Returning variable as original table rows
hideUntranslated
DataType
boolean
Required
false
Description
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
limit
DataType
integer
Default
1
Required
false
Description
Optional limit number of content elements to render
slide
DataType
integer
Required
false
Description
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.
slideCollect
DataType
integer
Required
false
Description
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.
slideCollectReverse
DataType
boolean
Required
false
Description
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.
ViewHelper for rendering a random content element in Fluid page templates.
Arguments
column
DataType
integer
Required
false
Description
Column position number (colPos) of the column to render
order
DataType
string
Default
'sorting'
Required
false
Description
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.
sortDirection
DataType
string
Default
'ASC'
Required
false
Description
Optional sort direction of content elements
pageUid
DataType
integer
Required
false
Description
If set, selects only content from this page UID. Ignored when "contentUids" is specified.
contentUids
DataType
mixed
Required
false
Description
If used, replaces all conditions with an "uid IN (1,2,3)" style condition using the UID values from this array
sectionIndexOnly
DataType
boolean
Required
false
Description
If TRUE, only renders/gets content that is marked as "include in section index"
loadRegister
DataType
mixed
Required
false
Description
List of LOAD_REGISTER variable
render
DataType
boolean
Default
true
Required
false
Description
Render result
hideUntranslated
DataType
boolean
Required
false
Description
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
limit
DataType
integer
Default
1
Required
false
Description
Optional limit number of content elements to render
slide
DataType
integer
Required
false
Description
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.
slideCollect
DataType
integer
Required
false
Description
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.
slideCollectReverse
DataType
boolean
Required
false
Description
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.
Returns the current application context which may include possible sub-contexts.
The application context can be 'Production', 'Development' or 'Testing'.
Additionally each context can be extended with custom sub-contexts like: 'Production/Staging' or
'Production/Staging/Server1'. If no application context has been set by the configuration, then the
default context is 'Production'.
Note about how to set the application context
The context TYPO3 CMS runs in is specified through the environment variable TYPO3_CONTEXT.
It can be set by .htaccess or in the server configuration
This viewhelper returns the properly prefixed name of the given
form field and generates the corresponding HMAC to allow posting
of dynamically added fields.
Arguments
name
DataType
string
Required
false
Description
Name of the form field to generate the HMAC for.
property
DataType
string
Required
false
Description
Name of object property. If used in conjunction with <f:form object="...">, "name" argument will be ignored.
Appends a string after another string. Although this task is very
easily done in standard Fluid - i.e. {subject}{add} - this
ViewHelper makes advanced chained inline processing possible:
<!-- useful when needing to chain string processing. Remove all "foo" and "bar"
then add a text containing both "foo" and "bar", then format as HTML -->
{text -> v:format.eliminate(strings: 'foo,bar')
-> v:format.append(add: ' - my foo and bar are the only ones in this text.')
-> f:format.html()}
<!-- NOTE: you do not have to break the lines; done here only for presentation purposes -->
Copied!
Makes no sense used as tag based ViewHelper:
<!-- DO NOT USE - depicts COUNTERPRODUCTIVE usage! -->
<v:format.append add="{f:translate(key: 're')}">{subject}</v:format.append>
<!-- ... which is the exact same as ... -->
<f:translate key="re" />{subject} <!-- OR --> {f:translate(key: 're')}{subject}
Copied!
In other words: use this only when you do not have the option of
simply using {subject}{add}, i.e. in complex inline statements used
as attribute values on other ViewHelpers (where tag usage is undesirable).
Arguments
subject
DataType
string
Required
false
Description
String to append other string to
add
DataType
string
Required
false
Description
String to append
format.case ViewHelper <vhs:format.case>
Case Formatting ViewHelper
Formats string case according to provided arguments.
Uses DateTime and DateInterval operations to calculate a range
between two DateTimes.
Usages
As formatter, the ViewHelper can output a string value such as
"2013-04-30 - 2013-05-30" where you can configure both the start
and end date (or their common) formats as well as the "glue"
which binds the two dates together.
As interval calculator, the ViewHelper can be used with a special
"intervalFormat" which is a string used in the constructor method
for the DateInterval class - for example, "P3M" to add three months.
Used this way, you can specify the start date (or rely on the
default "now" DateTime) and specify the "intervalFormat" to add
your desired duration to your starting date and use that as end
date. Without the "return" attribute, this mode simply outputs
the formatted dates with interval deciding the end date.
When used with the "return" attribute you can specify which type
of data to return:
- if "return" is "DateTime", a single DateTime instance is returned
(which is the end date). Use this with a start date to return the
DateTime corresponding to "intervalFormat" into the future/past.
- if "return" is a string such as "w", "d", "h" etc. the corresponding
counter value (weeks, days, hours etc.) is returned.
- if "return" is an array of counter IDs, for example ["w", "d"],
the corresponding counters from the range are returned as an array.
Note about LLL support and array consumers
When used with the "return" attribute and when this attribute is an
array, the output becomes suitable for consumption by f:translate, v:l
or f:format.sprintf for example - as the "arguments" attribute:
Which if "myDateDisplay" is a string such as "Deadline: %d week(s) and
%d day(s)" would output a result such as "Deadline: 4 week(s) and 2 day(s)".
Tip: the values returned by this ViewHelper in both array and single
value return modes, are also nicely consumable by the "math" suite
of ViewHelpers, for example v:math.division would be able to divide
number of days by two, three etc. to further divide the date range.
Arguments
start
DataType
mixed
Default
'now'
Required
false
Description
Start date which can be a DateTime object or a string consumable by DateTime constructor
end
DataType
mixed
Required
false
Description
End date which can be a DateTime object or a string consumable by DateTime constructor
intervalFormat
DataType
string
Required
false
Description
Interval format consumable by DateInterval
format
DataType
string
Default
'Y-m-d'
Required
false
Description
Date format to apply to both start and end date
startFormat
DataType
string
Required
false
Description
Date format to apply to start date
endFormat
DataType
string
Required
false
Description
Date format to apply to end date
glue
DataType
string
Default
'-'
Required
false
Description
Glue string to concatenate dates with
spaceGlue
DataType
boolean
Default
true
Required
false
Description
If TRUE glue string is surrounded with whitespace
return
DataType
mixed
Required
false
Description
Return type; can be exactly "DateTime" to return a DateTime instance, a string like "w" or "d" to return weeks, days between the two dates - or an array of w, d, etc. strings to return the corresponding range count values as an array.
There is no example - each argument describes how it should be
used and arguments can be used individually or in any combination.
Arguments
content
DataType
string
Required
false
Description
String in which to perform replacement
caseSensitive
DataType
boolean
Default
true
Required
false
Description
Wether or not to perform case sensitive replacement
characters
DataType
mixed
Required
false
Description
Characters to remove. Array or string, i.e. {0: 'a', 1: 'b', 2: 'c'} or 'abc' to remove all occurrences of a, b and c
strings
DataType
mixed
Required
false
Description
Strings to remove. Array or CSV, i.e. {0: 'foo', 1: 'bar'} or 'foo,bar' to remove all occorrences of foo and bar. If your strings overlap then place the longest match first
whitespace
DataType
boolean
Required
false
Description
Eliminate ALL whitespace characters
whitespaceBetweenHtmlTags
DataType
boolean
Required
false
Description
Eliminate ALL whitespace characters between HTML tags. Use this together with <f:format.raw>
tabs
DataType
boolean
Required
false
Description
Eliminate only tab whitespaces
unixBreaks
DataType
boolean
Required
false
Description
Eliminate only UNIX line breaks
windowsBreaks
DataType
boolean
Required
false
Description
Eliminates only Windows carriage returns
digits
DataType
boolean
Required
false
Description
Eliminates all number characters (but not the dividers between floats converted to strings)
letters
DataType
boolean
Required
false
Description
Eliminates all letters (non-numbers, non-whitespace, non-syntactical)
Hides output from browser, but still renders tag content
which means any ViewHelper inside the tag content still
gets processed.
Arguments
disabled
DataType
boolean
Required
false
Description
If TRUE, renders content - use to quickly enable/disable Fluid code
format.markdown ViewHelper <vhs:format.markdown>
Markdown Transformation ViewHelper
Requires an installed "markdown" utility, the specific
implementation is less important since Markdown has no
configuration options. However, the utility or shell
scipt must:
accept input from STDIN
output to STDOUT
place errors in STDERR
be executable according to open_basedir and others
exist within (one or more of) TYPO3's configured executable paths
In other words, *NIX standard behavior must be used.
Processes output as plaintext. Will trim whitespace off
each line that is provided, making display in a <pre>
work correctly indented even if the source is not.
Expects that you use f:format.htmlentities or similar
if you do not want HTML to be displayed as HTML, or
simply want it stripped out.
String to match with the regex pattern or patterns
pattern
DataType
string
Required
true
Description
Regex pattern to match against
replacement
DataType
string
Required
true
Description
String to replace matches with
as
DataType
string
Required
false
Description
Template variable name to assign; if not specified the ViewHelper returns the variable instead.
format.prepend ViewHelper <vhs:format.prepend>
Format: Prepend string content
Prepends one string on another. Although this task is very
easily done in standard Fluid - i.e. {add}{subject} - this
ViewHelper makes advanced chained inline processing possible:
<!-- Adds 1H to DateTime, formats using timestamp input which requires prepended @ -->
{dateTime.timestamp
-> v:math.sum(b: 3600)
-> v:format.prepend(add: '@')
-> v:format.date(format: 'Y-m-d H:i')}
<!-- You don't have to break the syntax into lines; done here for display only -->
Copied!
Arguments
subject
DataType
string
Required
false
Description
String to prepend other string to
add
DataType
string
Required
false
Description
String to prepend
format.replace ViewHelper <vhs:format.replace>
Replaces $substring in $content with $replacement.
Supports array as input substring/replacements and content.
When input substring/replacement is an array, both must be
the same length and must contain only strings.
When input content is an array, the search/replace is done
on every value in the input content array and the return
value will be an array of equal size as the input content
array but with all values search/replaced. All values in the
input content array must be strings.
Arguments
content
DataType
string
Required
false
Description
Content in which to perform replacement. Array supported.
substring
DataType
string
Required
true
Description
Substring to replace. Array supported.
replacement
DataType
string
Required
false
Description
Replacement to insert. Array supported.
returnCount
DataType
boolean
Required
false
Description
If TRUE, returns the number of replacements that were performed instead of returning output string. See also v:count.substring.
URL text segment sanitizer. Sanitizes the content into a
valid URL segment value which is usable in an URL without
further processing. For example, the text "I am Mr. Brown,
how are you?" becomes "i-am-mr-brown-how-are-you". Special
characters like diacritics or umlauts are transliterated.
The built-in character map can be overriden or extended by
providing an associative array of custom mappings.
Also useful when creating anchor link names, for example
for news entries in your custom EXT:news list template, in
which case each news item's title would become an anchor:
And links would look much like the detail view links:
/news/#this-is-a-newsitem-title
When used with list views it has the added benefit of not
breaking if the item referenced is removed, it can be read
by Javascript (for example to dynamically expand the news
item being referenced). The sanitized urls are also ideal
to use for AJAX based detail views - and in almot all cases
the sanitized string will be 100% identical to the one used
by Realurl when translating using table lookups.
Arguments
string
DataType
string
Required
false
Description
The string to sanitize.
customMap
DataType
mixed
Required
false
Description
Associative array of additional characters to replace or use to override built-in mappings.
Gets a substring from a string or string-compatible value.
Also see the <f:format.crop> view helper.
Arguments
content
DataType
string
Required
false
Description
Content string to substring
start
DataType
integer
Required
false
Description
Positive or negative offset
length
DataType
integer
Required
false
Description
Positive or negative length
format.tidy ViewHelper <vhs:format.tidy>
Tidy-processes a string (HTML source), applying proper
indentation.
Arguments
content
DataType
string
Required
false
Description
Content to tidy
encoding
DataType
string
Default
'utf8'
Required
false
Description
Encoding of string
format.trim ViewHelper <vhs:format.trim>
Trims $content by stripping off $characters (string list
of individual chars to strip off, default is all whitespaces).
Arguments
content
DataType
string
Required
false
Description
String to trim
characters
DataType
string
Required
false
Description
List of characters to trim, no separators, e.g. "abc123"
format.wordWrap ViewHelper <vhs:format.wordWrap>
Wordwrap: Wrap a string at provided character count
Wraps a string to $limit characters and at $break character
while maintaining complete words. Concatenates the resulting
strings with $glue. Code is heavily inspired
by Codeigniter's word_wrap helper.
Arguments
subject
DataType
string
Required
false
Description
Text to wrap
limit
DataType
integer
Default
80
Required
false
Description
Maximum length of resulting parts after wrapping
break
DataType
string
Required
false
Description
Character to wrap text at
glue
DataType
string
Required
false
Description
Character to concatenate parts with after wrapping
Returns a string containing the JSON representation of the argument.
The argument may be any of the following types:
arrays, associative and traditional
DomainObjects
arrays containing DomainObjects
ObjectStorage containing DomainObjects
standard types (string, integer, boolean, float, NULL)
DateTime including ones found as property values on DomainObjects
Recursion protection is enabled for DomainObjects with the option to
add a special marker (any variable type above also supported here)
which is inserted where an object which would cause recursion would
be placed.
Be specially careful when you JSON encode DomainObjects which have
recursive relations to itself using either 1:n or m:n - in this case
the one member of the converted relation will be whichever value you
specified as "recursionMarker" - or the default value, NULL. When
using the output of such conversion in JavaScript please make sure you
check the type before assuming that every member of a converted 1:n
or m:n recursive relation is in fact a JavaScript. Not doing so may
result in fatal JavaScript errors in the client browser.
Arguments
value
DataType
mixed
Required
false
Description
Value to encode as JSON
useTraversableKeys
DataType
boolean
Required
false
Description
If TRUE, preserves keys from Traversables converted to arrays. Not recommended for ObjectStorages!
preventRecursion
DataType
boolean
Default
true
Required
false
Description
If FALSE, allows recursion to occur which could potentially be fatal to the output unless managed
recursionMarker
DataType
mixed
Required
false
Description
String or null - inserted instead of recursive instances of objects
dateTimeFormat
DataType
string
Required
false
Description
A date() format for DateTime values to JSON-compatible values. NULL means JS UNIXTIME (time()*1000)
Creates chunks from an input Array/Traversable with option to allocate items to a fixed number of chunks
Arguments
subject
DataType
mixed
Required
false
Description
The subject Traversable/Array instance to shift
count
DataType
integer
Required
true
Description
Number of items/chunk or if fixed then number of chunks
as
DataType
string
Required
false
Description
Template variable name to assign; if not specified the ViewHelper returns the variable instead.
fixed
DataType
boolean
Required
false
Description
If true, creates $count chunks instead of $count values per chunk
preserveKeys
DataType
boolean
Required
false
Description
If set to true, the original array keys will be preserved
iterator.column ViewHelper <vhs:iterator.column>
Iterator Column Extraction ViewHelper
Implementation of array_column for Fluid.
Accepts an input iterator/array and creates a new array
using values from one column and optionally keys from another
column.
Usage examples
<!-- Given input array of user data arrays with "name" and "uid" column: -->
<f:for each="{users -> v:iterator.column(columnKey: 'name', indexKey: 'uid')}" as="username" key="uid">
User {username} has UID {uid}.
</f:for>
Copied!
The above demonstrates the logic of the ViewHelper, but the
example itself of course gives the same result as just iterating
the users variable itself and outputting {user.username} etc.,
but the real power of the ViewHelper comes when using it to feed
other ViewHelpers with data sets:
<!--
Given same input array as above. Idea being that *any* iterator
can be supported as input for "options".
-->
Select user: <f:form.select options="{users -> v:iterator.column(columnKey: 'name', indexKey: 'uid')}" />
Copied!
<!-- Given same input array as above. Idea being to output all user UIDs as CSV -->
All UIDs: {users -> v:iterator.column(columnKey: 'uid') -> v:iterator.implode()}
Copied!
<!-- Given same input array as above. Idea being to output all unique users' countries as a list: -->
Our users live in the following countries:
{users -> v:iterator.column(columnKey: 'countryName')
-> v:iterator.unique()
-> v:iterator.implode(glue: ' - ')}
Copied!
Note that the ViewHelper also supports the "as" argument which
allows you to not return the new array but instead assign it
as a new template variable - like any other "as"-capable ViewHelper.
Caveat
This ViewHelper passes the subject directly to array_column and
as such it does not support dotted paths in either key argument
to extract sub-properties. That means it does not support Extbase
enties as input unless you explicitly implemented `ArrayAccess` on
the model of the entity and even then support is limited to first
level properties' values without dots in their names.
Arguments
subject
DataType
mixed
Required
false
Description
Input to work on - Array/Traversable/...
columnKey
DataType
string
Required
false
Description
Name of the column whose values will become the value of the new array
indexKey
DataType
string
Required
false
Description
Name of the column whose values will become the index of the new array
as
DataType
string
Required
false
Description
Template variable name to assign; if not specified the ViewHelper returns the variable instead.
String "glue" that separates values. If you need a constant (like PHP_EOL), use v:const to read it.
limit
DataType
mixed
Default
9223372036854775807
Required
false
Description
If limit is set and positive, the returned array will contain a maximum of limit elements with the last element containing the rest of string. If the limit parameter is negative, all components except the last-limit are returned. If the limit parameter is zero, then this is treated as 1.
as
DataType
string
Required
false
Description
Template variable name to assign; if not specified the ViewHelper returns the variable instead.
Loop through the iterator and extract a key, optionally join the
results if more than one value is found.
Extract values from an array by key
The extbase version of indexed_search returns an array of the
previous search, which cannot easily be shown in the input field
of the result page. This can be solved.
Outputs the "uid" value of the first record in variable $someRecords without caring if there are more than
one records. Always extracts the first value and then stops. Equivalent of changing -> v:iterator.first().
The array or Iterator that contains either the value or arrays of values
key
DataType
string
Required
true
Description
The name of the key from which you wish to extract the value
recursive
DataType
boolean
Default
true
Required
false
Description
If TRUE, attempts to extract the key from deep nested arrays
single
DataType
boolean
Required
false
Description
If TRUE, returns only one value - always the first one - instead of an array of values
iterator.filter ViewHelper <vhs:iterator.filter>
Iterator: Filter ViewHelper
Filters an array by filtering the array, analysing each member
and asserting if it is equal to (weak type) the filter parameter.
If propertyName is set, the ViewHelper will try to extract this
property from each member of the array.
Iterators and ObjectStorage etc. are supported.
Arguments
subject
DataType
mixed
Required
false
Description
The subject iterator/array to be filtered
filter
DataType
mixed
Required
false
Description
The comparison value
propertyName
DataType
string
Required
false
Description
Optional property name to extract and use for comparison instead of the object; use on ObjectStorage etc. Note: supports dot-path expressions
preserveKeys
DataType
boolean
Required
false
Description
If TRUE, keys in the array are preserved - even if they are numeric
invert
DataType
boolean
Required
false
Description
Invert the behavior of the filtering
nullFilter
DataType
boolean
Required
false
Description
If TRUE and $filter is NULL (not set) includes only NULL values. Useful with $invert.
iterator.first ViewHelper <vhs:iterator.first>
Returns the first element of $haystack.
Arguments
haystack
DataType
mixed
Required
false
Description
Haystack in which to look for needle
iterator.for ViewHelper <vhs:iterator.for>
Repeats rendering of children with a typical for loop: starting at
index $from it will loop until the index has reached $to.
Arguments
iteration
DataType
string
Required
false
Description
Variable name to insert result into, suppresses output
to
DataType
integer
Required
true
Description
Number that the index needs to reach before stopping
from
DataType
integer
Required
false
Description
Starting number for the index
step
DataType
integer
Default
1
Required
false
Description
Stepping number that the index is increased by after each loop
Reverses the order of every member of an Iterator/Array,
preserving the original keys.
Arguments
subject
DataType
mixed
Required
false
Description
The input array/Traversable to reverse
as
DataType
string
Required
false
Description
Template variable name to assign; if not specified the ViewHelper returns the variable instead.
iterator.shift ViewHelper <vhs:iterator.shift>
Shifts the first value off $subject (but does not change $subject itself as array_shift would).
Arguments
subject
DataType
mixed
Required
false
Description
The input array/Traversable to shift
as
DataType
string
Required
false
Description
Template variable name to assign; if not specified the ViewHelper returns the variable instead.
iterator.slice ViewHelper <vhs:iterator.slice>
Slice an Iterator by $start and $length.
Arguments
haystack
DataType
mixed
Required
false
Description
The input array/Traversable to reverse
start
DataType
integer
Required
false
Description
Starting offset
length
DataType
integer
Required
false
Description
Number of items to slice
preserveKeys
DataType
boolean
Default
true
Required
false
Description
Whether or not to preserve original keys
as
DataType
string
Required
false
Description
Template variable name to assign; if not specified the ViewHelper returns the variable instead.
iterator.sort ViewHelper <vhs:iterator.sort>
Sorts an instance of ObjectStorage, an Iterator implementation,
an Array or a QueryResult (including Lazy counterparts).
Can be used inline, i.e.:
<f:for each="{dataset -> v:iterator.sort(sortBy: 'name')}" as="item">
// iterating data which is ONLY sorted while rendering this particular loop
</f:for>
Copied!
Arguments
subject
DataType
mixed
Required
false
Description
The array/Traversable instance to sort
sortBy
DataType
string
Required
false
Description
Which property/field to sort by - leave out for numeric sorting based on indexes(keys)
order
DataType
string
Default
'ASC'
Required
false
Description
ASC, DESC, RAND or SHUFFLE. RAND preserves keys, SHUFFLE does not - but SHUFFLE is faster
sortFlags
DataType
string
Default
'SORT_REGULAR'
Required
false
Description
Constant name from PHP for SORT_FLAGS: SORT_REGULAR, SORT_STRING, SORT_NUMERIC, SORT_NATURAL, SORT_LOCALE_STRING or SORT_FLAG_CASE. You can provide a comma seperated list or array to use a combination of flags.
as
DataType
string
Required
false
Description
Template variable name to assign; if not specified the ViewHelper returns the variable instead.
iterator.split ViewHelper <vhs:iterator.split>
Converts a string to an array with $length number of bytes
per new array element. Wrapper for PHP's str_split.
Arguments
subject
DataType
string
Required
false
Description
The string that will be split into an array
length
DataType
integer
Default
1
Required
false
Description
Number of bytes per chunk in the new array
as
DataType
string
Required
false
Description
Template variable name to assign; if not specified the ViewHelper returns the variable instead.
iterator.unique ViewHelper <vhs:iterator.unique>
Iterator Unique Values ViewHelper
Implementation of array_unique for Fluid
Accepts an input array of values and returns/assigns
a new array containing only the unique values found
in the input array.
Note that the ViewHelper does not support the sorting
parameter - if you wish to sort the result you should
use v:iterator.sort in a chain.
Usage examples
<!--
Given a (large) array of every user's country with possible duplicates.
The idea being to output only a unique list of countries' names.
-->
Countries of our users: {userCountries -> v:iterator.unique() -> v:iterator.implode(glue: ' - ')}
Copied!
Output:
Countries of our users: USA - USA - Denmark - Germany - Germany - USA - Denmark - Germany
Copied!
<!-- Given the same use case as above but also implementing sorting -->
Countries of our users, in alphabetical order:
{userCountries -> v:iterator.unique()
-> v:iterator.sort(sortFlags: 'SORT_NATURAL')
-> v:iterator.implode(glue: ' - ')}
Copied!
Output:
Countries of our users: Denmark - Germany - USA
Copied!
Arguments
subject
DataType
mixed
Required
false
Description
The input array/Traversable to process
as
DataType
string
Required
false
Description
Template variable name to assign; if not specified the ViewHelper returns the variable instead.
iterator.values ViewHelper <vhs:iterator.values>
Gets values from an iterator, removing current keys (if any exist).
Arguments
subject
DataType
mixed
Required
false
Description
The array/Traversable instance from which to get values
as
DataType
string
Required
false
Description
Template variable name to assign; if not specified the ViewHelper returns the variable instead.
Performs average across an array. If $a is an array and
$b is an array, each member of $a is averaged against the
same member in $b. If $a is an array and $b is a number,
each member of $a is averaged agained $b. If $a is an array
this array is averaged to one number. If $a is a number and
$b is not provided or NULL, $a is gracefully returned as an
average value of itself.
Arguments
a
-
DataType
mixed
Required
false
Description
First number for calculation
b
-
DataType
mixed
Required
false
Description
Optional: Second number or Iterator/Traversable/Array for calculation
fail
DataType
boolean
Required
false
Description
If TRUE, throws an Exception if argument "a" is not specified and no child content or inline argument is found. Usually okay to use a NULL value (as integer zero).
math.ceil ViewHelper <vhs:math.ceil>
Math: Ceil
Ceiling on $a which can be either an array-accessible
value (Iterator+ArrayAccess || array) or a raw numeric
value.
Arguments
a
-
DataType
mixed
Required
false
Description
First number for calculation
fail
DataType
boolean
Required
false
Description
If TRUE, throws an Exception if argument "a" is not specified and no child content or inline argument is found. Usually okay to use a NULL value (as integer zero).
math.cube ViewHelper <vhs:math.cube>
Math: Square
Performs $a ^ 3.
Arguments
a
-
DataType
mixed
Required
false
Description
First number for calculation
fail
DataType
boolean
Required
false
Description
If TRUE, throws an Exception if argument "a" is not specified and no child content or inline argument is found. Usually okay to use a NULL value (as integer zero).
math.cubicRoot ViewHelper <vhs:math.cubicRoot>
Math: CubicRoot
Performs pow($a, 1/3) - cubic or third root.
Arguments
a
-
DataType
mixed
Required
false
Description
First number for calculation
fail
DataType
boolean
Required
false
Description
If TRUE, throws an Exception if argument "a" is not specified and no child content or inline argument is found. Usually okay to use a NULL value (as integer zero).
math.division ViewHelper <vhs:math.division>
Math: Division
Performs division of $a using $b. A can be an array and $b a
number, in which case each member of $a gets divided by $b.
If both $a and $b are arrays, each member of $a is summed
against the corresponding member in $b compared using index.
Arguments
a
-
DataType
mixed
Required
false
Description
First number for calculation
b
-
DataType
mixed
Required
true
Description
Second number or Iterator/Traversable/Array for calculation
fail
DataType
boolean
Required
false
Description
If TRUE, throws an Exception if argument "a" is not specified and no child content or inline argument is found. Usually okay to use a NULL value (as integer zero).
math.floor ViewHelper <vhs:math.floor>
Math: Floor
Floors $a which can be either an array-accessible
value (Iterator+ArrayAccess || array) or a raw numeric
value.
Arguments
a
-
DataType
mixed
Required
false
Description
First number for calculation
fail
DataType
boolean
Required
false
Description
If TRUE, throws an Exception if argument "a" is not specified and no child content or inline argument is found. Usually okay to use a NULL value (as integer zero).
math.maximum ViewHelper <vhs:math.maximum>
Math: Maximum
Gets the highest number in array $a or the highest
number of numbers $a and $b.
Arguments
a
-
DataType
mixed
Required
false
Description
First number for calculation
b
-
DataType
mixed
Required
false
Description
Second number or Iterator/Traversable/Array for calculation
fail
DataType
boolean
Required
false
Description
If TRUE, throws an Exception if argument "a" is not specified and no child content or inline argument is found. Usually okay to use a NULL value (as integer zero).
math.median ViewHelper <vhs:math.median>
Math: Median
Gets the median value from an array of numbers. If there
is an odd number of numbers the middle value is returned.
If there is an even number of numbers an average of the
two middle numbers is returned.
Arguments
a
-
DataType
mixed
Required
false
Description
First number for calculation
fail
DataType
boolean
Required
false
Description
If TRUE, throws an Exception if argument "a" is not specified and no child content or inline argument is found. Usually okay to use a NULL value (as integer zero).
math.minimum ViewHelper <vhs:math.minimum>
Math: Minimum
Gets the lowest number in array $a or the lowest
number of numbers $a and $b.
Arguments
a
-
DataType
mixed
Required
false
Description
First number for calculation
b
-
DataType
mixed
Required
false
Description
Second number or Iterator/Traversable/Array for calculation
fail
DataType
boolean
Required
false
Description
If TRUE, throws an Exception if argument "a" is not specified and no child content or inline argument is found. Usually okay to use a NULL value (as integer zero).
math.modulo ViewHelper <vhs:math.modulo>
Math: Modulo
Perform modulo on $input. Returns the same type as $input,
i.e. if given an array, will transform each member and return
the result. Supports array and Iterator (in the following
descriptions "array" means both these types):
If $a and $b are both arrays of the same size then modulo is
performed on $a using members of $b, by their index (so these
must match in both arrays).
If $a is an array and $b is a number then modulo is performed
on $a using $b for each calculation.
If $a and $b are both numbers simple modulo is performed.
Arguments
a
-
DataType
mixed
Required
false
Description
First number for calculation
b
-
DataType
mixed
Required
true
Description
Second number or Iterator/Traversable/Array for calculation
fail
DataType
boolean
Required
false
Description
If TRUE, throws an Exception if argument "a" is not specified and no child content or inline argument is found. Usually okay to use a NULL value (as integer zero).
math.power ViewHelper <vhs:math.power>
Math: Power
Performs pow($a, $b) where $a is the base and $b is the exponent.
Arguments
a
-
DataType
mixed
Required
false
Description
First number for calculation
b
-
DataType
mixed
Required
true
Description
Second number or Iterator/Traversable/Array for calculation
fail
DataType
boolean
Required
false
Description
If TRUE, throws an Exception if argument "a" is not specified and no child content or inline argument is found. Usually okay to use a NULL value (as integer zero).
math.product ViewHelper <vhs:math.product>
Math: Product (multiplication)
Product (multiplication) of $a and $b. A can be an array and $b a
number, in which case each member of $a gets multiplied by $b.
If $a is an array and $b is not provided then array_product is
used to return a single numeric value. If both $a and $b are
arrays, each member of $a is multiplied against the corresponding
member in $b compared using index.
Arguments
a
-
DataType
mixed
Required
false
Description
First number for calculation
b
-
DataType
mixed
Required
true
Description
Second number or Iterator/Traversable/Array for calculation
fail
DataType
boolean
Required
false
Description
If TRUE, throws an Exception if argument "a" is not specified and no child content or inline argument is found. Usually okay to use a NULL value (as integer zero).
math.range ViewHelper <vhs:math.range>
Math: Range
Gets the lowest and highest number from an array of numbers.
Returns an array of [low, high]. For individual low/high
values please use v:math.maximum and v:math.minimum.
Arguments
a
-
DataType
mixed
Required
false
Description
First number for calculation
fail
DataType
boolean
Required
false
Description
If TRUE, throws an Exception if argument "a" is not specified and no child content or inline argument is found. Usually okay to use a NULL value (as integer zero).
math.round ViewHelper <vhs:math.round>
Math: Round
Rounds off $a which can be either an array-accessible
value (Iterator+ArrayAccess || array) or a raw numeric
value.
Arguments
a
-
DataType
mixed
Required
false
Description
First number for calculation
fail
DataType
boolean
Required
false
Description
If TRUE, throws an Exception if argument "a" is not specified and no child content or inline argument is found. Usually okay to use a NULL value (as integer zero).
decimals
DataType
integer
Required
false
Description
Number of decimals
math.squareRoot ViewHelper <vhs:math.squareRoot>
Math: SquareRoot
Performs sqrt($a).
Arguments
a
-
DataType
mixed
Required
false
Description
First number for calculation
fail
DataType
boolean
Required
false
Description
If TRUE, throws an Exception if argument "a" is not specified and no child content or inline argument is found. Usually okay to use a NULL value (as integer zero).
math.square ViewHelper <vhs:math.square>
Math: Square
Performs $a ^ 2.
Arguments
a
-
DataType
mixed
Required
false
Description
First number for calculation
fail
DataType
boolean
Required
false
Description
If TRUE, throws an Exception if argument "a" is not specified and no child content or inline argument is found. Usually okay to use a NULL value (as integer zero).
math.subtract ViewHelper <vhs:math.subtract>
Math: Subtract
Performs subtraction of $a and $b. A can be an array and $b a
number, in which case each member of $a gets subtracted $b.
If $a is an array and $b is not provided then neg. array_sum is
used to return a single numeric value. If both $a and $b are
arrays, each member of $a is summed against the corresponding
member in $b compared using index.
Arguments
a
-
DataType
mixed
Required
false
Description
First number for calculation
b
-
DataType
mixed
Required
false
Description
Optional: Second number or Iterator/Traversable/Array for calculation
fail
DataType
boolean
Required
false
Description
If TRUE, throws an Exception if argument "a" is not specified and no child content or inline argument is found. Usually okay to use a NULL value (as integer zero).
math.sum ViewHelper <vhs:math.sum>
Math: Sum
Performs sum of $a and $b. A can be an array and $b a
number, in which case each member of $a gets summed with $b.
If $a is an array and $b is not provided then array_sum is
used to return a single numeric value. If both $a and $b are
arrays, each member of $a is summed against the corresponding
member in $b compared using index.
Arguments
a
-
DataType
mixed
Required
false
Description
First number for calculation
b
-
DataType
mixed
Required
false
Description
Optional: Second number or Iterator/Traversable/Array for calculation
fail
DataType
boolean
Required
false
Description
If TRUE, throws an Exception if argument "a" is not specified and no child content or inline argument is found. Usually okay to use a NULL value (as integer zero).
Renders HTML code to embed a HTML5 audio player. NOTICE: This is
all HTML5 and won't work on browsers like IE8 and below. Include
some helper library like kolber.github.io/audiojs/ if you need to suport those.
Source can be a single file, a CSV of files or an array of arrays
with multiple sources for different audio formats. In the latter
case provide array keys 'src' and 'type'. Providing an array of
sources (even for a single source) is preferred as you can set
the correct mime type of the audio which is otherwise guessed
from the filename's extension.
Arguments
additionalAttributes
DataType
mixed
Required
false
Description
Additional tag attributes. They will be added directly to the resulting HTML tag.
data
DataType
mixed
Required
false
Description
Additional data-* attributes. They will each be added with a "data-" prefix.
aria
DataType
mixed
Required
false
Description
Additional aria-* attributes. They will each be added with a "aria-" prefix.
src
DataType
mixed
Required
true
Description
Path to the media resource(s). Can contain single or multiple paths for videos/audio (either CSV, array or implementing Traversable).
relative
DataType
boolean
Default
true
Required
false
Description
If FALSE media URIs are rendered absolute. URIs in backend mode are always absolute.
class
DataType
string
Required
false
Description
CSS class(es) for this element
dir
DataType
string
Required
false
Description
Text direction for this HTML element. Allowed strings: "ltr" (left to right), "rtl" (right to left)
id
DataType
string
Required
false
Description
Unique (in this file) identifier for this HTML element.
lang
DataType
string
Required
false
Description
Language for this element. Use short names specified in RFC 1766
style
DataType
string
Required
false
Description
Individual CSS styles for this element
title
DataType
string
Required
false
Description
Tooltip text of element
accesskey
DataType
string
Required
false
Description
Keyboard shortcut to access this element
tabindex
DataType
integer
Required
false
Description
Specifies the tab order of this element
onclick
DataType
string
Required
false
Description
JavaScript evaluated for the onclick event
forceClosingTag
DataType
boolean
Required
false
Description
If TRUE, forces the created tag to use a closing tag. If FALSE, allows self-closing tags.
hideIfEmpty
DataType
boolean
Required
false
Description
Hide the tag completely if there is no tag content
contenteditable
DataType
string
Required
false
Description
Specifies whether the contents of the element are editable.
contextmenu
DataType
string
Required
false
Description
The value of the id attribute on the menu with which to associate the element as a context menu.
draggable
DataType
string
Required
false
Description
Specifies whether the element is draggable.
dropzone
DataType
string
Required
false
Description
Specifies what types of content can be dropped on the element, and instructs the UA about which actions to take with content when it is dropped on the element.
translate
DataType
string
Required
false
Description
Specifies whether an elements attribute values and contents of its children are to be translated when the page is localized, or whether to leave them unchanged.
spellcheck
DataType
string
Required
false
Description
Specifies whether the element represents an element whose contents are subject to spell checking and grammar checking.
hidden
DataType
string
Required
false
Description
Specifies that the element represents an element that is not yet, or is no longer, relevant.
width
DataType
integer
Required
true
Description
Sets the width of the audio player in pixels.
height
DataType
integer
Required
true
Description
Sets the height of the audio player in pixels.
autoplay
DataType
boolean
Required
false
Description
Specifies that the audio will start playing as soon as it is ready.
controls
DataType
boolean
Required
false
Description
Specifies that audio controls should be displayed (such as a play/pause button etc).
loop
DataType
boolean
Required
false
Description
Specifies that the audio will start over again, every time it is finished.
muted
DataType
boolean
Required
false
Description
Specifies that the audio output of the audio should be muted.
poster
DataType
string
Required
false
Description
Specifies an image to be shown while the audio is downloading, or until the user hits the play button.
preload
DataType
string
Default
'auto'
Required
false
Description
Specifies if and how the author thinks the audio should be loaded when the page loads. Can be "auto", "metadata" or "none".
unsupported
DataType
string
Required
false
Description
Add a message for old browsers like Internet Explorer 9 without audio support.
media.exists ViewHelper <vhs:media.exists>
File/Directory Exists Condition ViewHelper.
Arguments
then
DataType
mixed
Required
false
Description
Value to be returned if the condition if met.
else
DataType
mixed
Required
false
Description
Value to be returned if the condition if not met.
file
DataType
string
Required
false
Description
Filename which must exist to trigger f:then rendering
directory
DataType
string
Required
false
Description
Directory which must exist to trigger f:then rendering
media.extension ViewHelper <vhs:media.extension>
Returns the extension of the provided file.
Arguments
file
DataType
string
Required
false
Description
Path to the file to determine extension for.
media.files ViewHelper <vhs:media.files>
Returns an array of files found in the provided path.
Arguments
path
DataType
string
Required
false
Description
Path to the folder containing the files to be listed.
extensionList
DataType
string
Required
false
Description
A comma seperated list of file extensions to pick up.
prependPath
DataType
boolean
Required
false
Description
If set to TRUE the path will be prepended to file names.
order
DataType
string
Required
false
Description
If set to "mtime" sorts files by modification time or alphabetically otherwise.
excludePattern
DataType
string
Required
false
Description
A comma seperated list of filenames to exclude, no wildcards.
media.gravatar ViewHelper <vhs:media.gravatar>
Renders Gravatar <img/> tag.
Arguments
additionalAttributes
DataType
mixed
Required
false
Description
Additional tag attributes. They will be added directly to the resulting HTML tag.
data
DataType
mixed
Required
false
Description
Additional data-* attributes. They will each be added with a "data-" prefix.
aria
DataType
mixed
Required
false
Description
Additional aria-* attributes. They will each be added with a "aria-" prefix.
class
DataType
string
Required
false
Description
CSS class(es) for this element
dir
DataType
string
Required
false
Description
Text direction for this HTML element. Allowed strings: "ltr" (left to right), "rtl" (right to left)
id
DataType
string
Required
false
Description
Unique (in this file) identifier for this HTML element.
lang
DataType
string
Required
false
Description
Language for this element. Use short names specified in RFC 1766
style
DataType
string
Required
false
Description
Individual CSS styles for this element
title
DataType
string
Required
false
Description
Tooltip text of element
accesskey
DataType
string
Required
false
Description
Keyboard shortcut to access this element
tabindex
DataType
integer
Required
false
Description
Specifies the tab order of this element
onclick
DataType
string
Required
false
Description
JavaScript evaluated for the onclick event
email
DataType
string
Required
true
Description
Email address
size
DataType
integer
Required
false
Description
Size in pixels, defaults to 80px [ 1 - 2048 ]
imageSet
DataType
string
Required
false
Description
Default image set to use. Possible values [ 404 | mm | identicon | monsterid | wavatar ]
maximumRating
DataType
string
Required
false
Description
Maximum rating (inclusive) [ g | pg | r | x ]
secure
DataType
boolean
Default
true
Required
false
Description
If it is FALSE will return the un secure Gravatar domain (www.gravatar.com)
media.image ViewHelper <vhs:media.image>
Renders an image tag for the given resource including all valid
HTML5 attributes. Derivates of the original image are rendered
if the provided (optional) dimensions differ.
## rendering responsive Images variants
You can use the srcset argument to generate several differently sized
versions of this image that will be added as a srcset argument to the img tag.
enter a list of widths in the srcset to genereate copies of the same crop +
ratio but in the specified widths. Put the width at the start that you want
to use as a fallback to be shown when no srcset functionality is supported.
Additional tag attributes. They will be added directly to the resulting HTML tag.
data
DataType
mixed
Required
false
Description
Additional data-* attributes. They will each be added with a "data-" prefix.
aria
DataType
mixed
Required
false
Description
Additional aria-* attributes. They will each be added with a "aria-" prefix.
src
DataType
mixed
Required
true
Description
Path to the media resource(s). Can contain single or multiple paths for videos/audio (either CSV, array or implementing Traversable).
relative
DataType
boolean
Default
true
Required
false
Description
If FALSE media URIs are rendered absolute. URIs in backend mode are always absolute.
width
DataType
string
Required
false
Description
Width of the image. This can be a numeric value representing the fixed width of the image in pixels. But you can also perform simple calculations by adding "m" or "c" to the value. See imgResource.width for possible options.
height
DataType
string
Required
false
Description
Height of the image. This can be a numeric value representing the fixed height of the image in pixels. But you can also perform simple calculations by adding "m" or "c" to the value. See imgResource.width for possible options.
maxW
DataType
integer
Required
false
Description
Maximum Width of the image. (no upscaling)
maxH
DataType
integer
Required
false
Description
Maximum Height of the image. (no upscaling)
minW
DataType
integer
Required
false
Description
Minimum Width of the image.
minH
DataType
integer
Required
false
Description
Minimum Height of the image.
format
DataType
string
Required
false
Description
Format of the processed file - also determines the target file format. If blank, TYPO3/IM/GM default is taken into account.
quality
DataType
integer
Default
90
Required
false
Description
Quality of the processed image. If blank/not present falls back to the default quality defined in install tool.
treatIdAsReference
DataType
boolean
Required
false
Description
When TRUE treat given src argument as sys_file_reference record. Applies only to TYPO3 6.x and above.
canvasWidth
DataType
integer
Required
false
Description
Width of an optional canvas to place the image on.
canvasHeight
DataType
integer
Required
false
Description
Height of an optional canvas to place the image on.
canvasColor
DataType
string
Required
false
Description
Background color of an optional canvas to place the image on (hex triplet).
transparencyColor
DataType
string
Required
false
Description
Color to set transparent when using canvas feature (hex triplet).
crop
DataType
string
Required
false
Description
Information generated by the backend's graphical cropping UI
graceful
DataType
boolean
Required
false
Description
Set to TRUE to ignore files that cannot be loaded. Default behavior is to throw an Exception.
class
DataType
string
Required
false
Description
CSS class(es) for this element
dir
DataType
string
Required
false
Description
Text direction for this HTML element. Allowed strings: "ltr" (left to right), "rtl" (right to left)
id
DataType
string
Required
false
Description
Unique (in this file) identifier for this HTML element.
lang
DataType
string
Required
false
Description
Language for this element. Use short names specified in RFC 1766
style
DataType
string
Required
false
Description
Individual CSS styles for this element
title
DataType
string
Required
false
Description
Tooltip text of element
accesskey
DataType
string
Required
false
Description
Keyboard shortcut to access this element
tabindex
DataType
integer
Required
false
Description
Specifies the tab order of this element
onclick
DataType
string
Required
false
Description
JavaScript evaluated for the onclick event
usemap
DataType
string
Required
false
Description
A hash-name reference to a map element with which to associate the image.
ismap
DataType
string
Required
false
Description
Specifies that its img element provides access to a server-side image map.
alt
DataType
string
Required
true
Description
Equivalent content for those who cannot process images or who have image loading disabled.
srcset
DataType
mixed
Required
false
Description
List of width used for the srcset variants (either CSV, array or implementing Traversable)
srcsetDefault
DataType
integer
Required
false
Description
Default width to use as a fallback for browsers that don't support srcset
Converts the provided PDF file into a PNG thumbnail and renders
the according image tag using Fluid's standard image ViewHelper
thus implementing its arguments. For PDF documents with multiple
pages the first page is rendered by default unless specified.
Arguments
additionalAttributes
DataType
mixed
Required
false
Description
Additional tag attributes. They will be added directly to the resulting HTML tag.
data
DataType
mixed
Required
false
Description
Additional data-* attributes. They will each be added with a "data-" prefix.
aria
DataType
mixed
Required
false
Description
Additional aria-* attributes. They will each be added with a "aria-" prefix.
src
DataType
mixed
Required
true
Description
Path to the media resource(s). Can contain single or multiple paths for videos/audio (either CSV, array or implementing Traversable).
relative
DataType
boolean
Default
true
Required
false
Description
If FALSE media URIs are rendered absolute. URIs in backend mode are always absolute.
width
DataType
string
Required
false
Description
Width of the image. This can be a numeric value representing the fixed width of the image in pixels. But you can also perform simple calculations by adding "m" or "c" to the value. See imgResource.width for possible options.
height
DataType
string
Required
false
Description
Height of the image. This can be a numeric value representing the fixed height of the image in pixels. But you can also perform simple calculations by adding "m" or "c" to the value. See imgResource.width for possible options.
maxW
DataType
integer
Required
false
Description
Maximum Width of the image. (no upscaling)
maxH
DataType
integer
Required
false
Description
Maximum Height of the image. (no upscaling)
minW
DataType
integer
Required
false
Description
Minimum Width of the image.
minH
DataType
integer
Required
false
Description
Minimum Height of the image.
format
DataType
string
Required
false
Description
Format of the processed file - also determines the target file format. If blank, TYPO3/IM/GM default is taken into account.
quality
DataType
integer
Default
90
Required
false
Description
Quality of the processed image. If blank/not present falls back to the default quality defined in install tool.
treatIdAsReference
DataType
boolean
Required
false
Description
When TRUE treat given src argument as sys_file_reference record. Applies only to TYPO3 6.x and above.
canvasWidth
DataType
integer
Required
false
Description
Width of an optional canvas to place the image on.
canvasHeight
DataType
integer
Required
false
Description
Height of an optional canvas to place the image on.
canvasColor
DataType
string
Required
false
Description
Background color of an optional canvas to place the image on (hex triplet).
transparencyColor
DataType
string
Required
false
Description
Color to set transparent when using canvas feature (hex triplet).
crop
DataType
string
Required
false
Description
Information generated by the backend's graphical cropping UI
graceful
DataType
boolean
Required
false
Description
Set to TRUE to ignore files that cannot be loaded. Default behavior is to throw an Exception.
class
DataType
string
Required
false
Description
CSS class(es) for this element
dir
DataType
string
Required
false
Description
Text direction for this HTML element. Allowed strings: "ltr" (left to right), "rtl" (right to left)
id
DataType
string
Required
false
Description
Unique (in this file) identifier for this HTML element.
lang
DataType
string
Required
false
Description
Language for this element. Use short names specified in RFC 1766
style
DataType
string
Required
false
Description
Individual CSS styles for this element
title
DataType
string
Required
false
Description
Tooltip text of element
accesskey
DataType
string
Required
false
Description
Keyboard shortcut to access this element
tabindex
DataType
integer
Required
false
Description
Specifies the tab order of this element
onclick
DataType
string
Required
false
Description
JavaScript evaluated for the onclick event
usemap
DataType
string
Required
false
Description
A hash-name reference to a map element with which to associate the image.
ismap
DataType
string
Required
false
Description
Specifies that its img element provides access to a server-side image map.
alt
DataType
string
Required
true
Description
Equivalent content for those who cannot process images or who have image loading disabled.
srcset
DataType
mixed
Required
false
Description
List of width used for the srcset variants (either CSV, array or implementing Traversable)
srcsetDefault
DataType
integer
Required
false
Description
Default width to use as a fallback for browsers that don't support srcset
path
DataType
string
Required
false
Description
DEPRECATED: Use src instead
minWidth
DataType
integer
Required
false
Description
DEPRECATED: Use minW instead
minHeight
DataType
integer
Required
false
Description
DEPRECATED: Use minH instead
maxWidth
DataType
integer
Required
false
Description
DEPRECATED: Use maxW instead
maxHeight
DataType
integer
Required
false
Description
DEPRECATED: Use maxH instead
density
DataType
integer
Default
100
Required
false
Description
Canvas resolution for rendering the PDF in dpi (higher means better quality)
background
DataType
string
Required
false
Description
Fill background of resulting image with this color (for transparent source files)
rotate
DataType
integer
Required
false
Description
Number of degress to rotate resulting image by (caution: very slow if not multiple of 90)
page
DataType
integer
Default
1
Required
false
Description
Optional page number to render as thumbnail for PDF documents with multiple pages
forceOverwrite
DataType
boolean
Required
false
Description
Forcibly overwrite existing converted PDF files
media.picture ViewHelper <vhs:media.picture>
Renders a picture element with different images/sources for specific
media breakpoints
Additional tag attributes. They will be added directly to the resulting HTML tag.
data
DataType
mixed
Required
false
Description
Additional data-* attributes. They will each be added with a "data-" prefix.
aria
DataType
mixed
Required
false
Description
Additional aria-* attributes. They will each be added with a "aria-" prefix.
src
DataType
mixed
Required
true
Description
Path to the image or FileReference.
treatIdAsReference
DataType
boolean
Required
false
Description
When TRUE treat given src argument as sys_file_reference record.
alt
DataType
string
Required
true
Description
Text for the alt attribute.
title
DataType
string
Required
false
Description
Text for the title attribute.
class
DataType
string
Required
false
Description
CSS class(es) to set.
loading
DataType
string
Required
false
Description
Native lazy-loading for images. Can be "lazy", "eager" or "auto"
media.size ViewHelper <vhs:media.size>
Returns the size of the provided file in bytes.
Arguments
path
DataType
string
Required
false
Description
Path to the file to determine size for.
media.source ViewHelper <vhs:media.source>
Used in conjuntion with the v:media.PictureViewHelper.
Please take a look at the v:media.PictureViewHelper documentation for more
information.
Arguments
additionalAttributes
DataType
mixed
Required
false
Description
Additional tag attributes. They will be added directly to the resulting HTML tag.
data
DataType
mixed
Required
false
Description
Additional data-* attributes. They will each be added with a "data-" prefix.
aria
DataType
mixed
Required
false
Description
Additional aria-* attributes. They will each be added with a "aria-" prefix.
class
DataType
string
Required
false
Description
CSS class(es) for this element
dir
DataType
string
Required
false
Description
Text direction for this HTML element. Allowed strings: "ltr" (left to right), "rtl" (right to left)
id
DataType
string
Required
false
Description
Unique (in this file) identifier for this HTML element.
lang
DataType
string
Required
false
Description
Language for this element. Use short names specified in RFC 1766
style
DataType
string
Required
false
Description
Individual CSS styles for this element
title
DataType
string
Required
false
Description
Tooltip text of element
accesskey
DataType
string
Required
false
Description
Keyboard shortcut to access this element
tabindex
DataType
integer
Required
false
Description
Specifies the tab order of this element
onclick
DataType
string
Required
false
Description
JavaScript evaluated for the onclick event
media
DataType
string
Required
false
Description
Media query for which breakpoint this sources applies
width
DataType
string
Required
false
Description
Width of the image. This can be a numeric value representing the fixed width of the image in pixels. But you can also perform simple calculations by adding "m" or "c" to the value. See imgResource.width for possible options.
height
DataType
string
Required
false
Description
Height of the image. This can be a numeric value representing the fixed height of the image in pixels. But you can also perform simple calculations by adding "m" or "c" to the value. See imgResource.width for possible options.
maxW
DataType
integer
Required
false
Description
Maximum Width of the image. (no upscaling)
maxH
DataType
integer
Required
false
Description
Maximum Height of the image. (no upscaling)
minW
DataType
integer
Required
false
Description
Minimum Width of the image.
minH
DataType
integer
Required
false
Description
Minimum Height of the image.
format
DataType
string
Required
false
Description
Format of the processed file - also determines the target file format. If blank, TYPO3/IM/GM default is taken into account.
quality
DataType
integer
Default
90
Required
false
Description
Quality of the processed image. If blank/not present falls back to the default quality defined in install tool.
relative
DataType
boolean
Required
false
Description
Produce a relative URL instead of absolute
media.spotify ViewHelper <vhs:media.spotify>
Renders HTML code to embed a Spotify play button.
Arguments
additionalAttributes
DataType
mixed
Required
false
Description
Additional tag attributes. They will be added directly to the resulting HTML tag.
data
DataType
mixed
Required
false
Description
Additional data-* attributes. They will each be added with a "data-" prefix.
aria
DataType
mixed
Required
false
Description
Additional aria-* attributes. They will each be added with a "aria-" prefix.
class
DataType
string
Required
false
Description
CSS class(es) for this element
dir
DataType
string
Required
false
Description
Text direction for this HTML element. Allowed strings: "ltr" (left to right), "rtl" (right to left)
id
DataType
string
Required
false
Description
Unique (in this file) identifier for this HTML element.
lang
DataType
string
Required
false
Description
Language for this element. Use short names specified in RFC 1766
style
DataType
string
Required
false
Description
Individual CSS styles for this element
title
DataType
string
Required
false
Description
Tooltip text of element
accesskey
DataType
string
Required
false
Description
Keyboard shortcut to access this element
tabindex
DataType
integer
Required
false
Description
Specifies the tab order of this element
onclick
DataType
string
Required
false
Description
JavaScript evaluated for the onclick event
spotifyUri
DataType
string
Required
true
Description
Spotify URI to create the play button for. Right click any song, album or playlist in Spotify and select Copy Spotify URI.
width
DataType
mixed
Default
300
Required
false
Description
Width of the play button in pixels. Defaults to 300
height
DataType
mixed
Default
380
Required
false
Description
Height of the play button in pixels. Defaults to 380
compact
DataType
boolean
Required
false
Description
Whether to render the compact button with a fixed height of 80px.
theme
DataType
string
Default
'black'
Required
false
Description
Theme to use. Can be "black" or "white" and is not available in compact mode. Defaults to "black".
view
DataType
string
Default
'list'
Required
false
Description
View to use. Can be "list" or "coverart" and is not available in compact mode. Defaults to "list".
media.video ViewHelper <vhs:media.video>
Renders HTML code to embed a HTML5 video player. NOTICE: This is
all HTML5 and won't work on browsers like IE8 and below. Include
some helper library like videojs.com if you need to suport those.
Source can be a single file, a CSV of files or an array of arrays
with multiple sources for different video formats. In the latter
case provide array keys 'src' and 'type'. Providing an array of
sources (even for a single source) is preferred as you can set
the correct mime type of the video which is otherwise guessed
from the filename's extension.
Arguments
additionalAttributes
DataType
mixed
Required
false
Description
Additional tag attributes. They will be added directly to the resulting HTML tag.
data
DataType
mixed
Required
false
Description
Additional data-* attributes. They will each be added with a "data-" prefix.
aria
DataType
mixed
Required
false
Description
Additional aria-* attributes. They will each be added with a "aria-" prefix.
src
DataType
mixed
Required
true
Description
Path to the media resource(s). Can contain single or multiple paths for videos/audio (either CSV, array or implementing Traversable).
relative
DataType
boolean
Default
true
Required
false
Description
If FALSE media URIs are rendered absolute. URIs in backend mode are always absolute.
class
DataType
string
Required
false
Description
CSS class(es) for this element
dir
DataType
string
Required
false
Description
Text direction for this HTML element. Allowed strings: "ltr" (left to right), "rtl" (right to left)
id
DataType
string
Required
false
Description
Unique (in this file) identifier for this HTML element.
lang
DataType
string
Required
false
Description
Language for this element. Use short names specified in RFC 1766
style
DataType
string
Required
false
Description
Individual CSS styles for this element
title
DataType
string
Required
false
Description
Tooltip text of element
accesskey
DataType
string
Required
false
Description
Keyboard shortcut to access this element
tabindex
DataType
integer
Required
false
Description
Specifies the tab order of this element
onclick
DataType
string
Required
false
Description
JavaScript evaluated for the onclick event
forceClosingTag
DataType
boolean
Required
false
Description
If TRUE, forces the created tag to use a closing tag. If FALSE, allows self-closing tags.
hideIfEmpty
DataType
boolean
Required
false
Description
Hide the tag completely if there is no tag content
contenteditable
DataType
string
Required
false
Description
Specifies whether the contents of the element are editable.
contextmenu
DataType
string
Required
false
Description
The value of the id attribute on the menu with which to associate the element as a context menu.
draggable
DataType
string
Required
false
Description
Specifies whether the element is draggable.
dropzone
DataType
string
Required
false
Description
Specifies what types of content can be dropped on the element, and instructs the UA about which actions to take with content when it is dropped on the element.
translate
DataType
string
Required
false
Description
Specifies whether an elements attribute values and contents of its children are to be translated when the page is localized, or whether to leave them unchanged.
spellcheck
DataType
string
Required
false
Description
Specifies whether the element represents an element whose contents are subject to spell checking and grammar checking.
hidden
DataType
string
Required
false
Description
Specifies that the element represents an element that is not yet, or is no longer, relevant.
width
DataType
integer
Required
true
Description
Sets the width of the video player in pixels.
height
DataType
integer
Required
true
Description
Sets the height of the video player in pixels.
autoplay
DataType
boolean
Required
false
Description
Specifies that the video will start playing as soon as it is ready.
controls
DataType
boolean
Required
false
Description
Specifies that video controls should be displayed (such as a play/pause button etc).
loop
DataType
boolean
Required
false
Description
Specifies that the video will start over again, every time it is finished.
muted
DataType
boolean
Required
false
Description
Specifies that the audio output of the video should be muted.
poster
DataType
string
Required
false
Description
Specifies an image to be shown while the video is downloading, or until the user hits the play button.
preload
DataType
string
Default
'auto'
Required
false
Description
Specifies if and how the author thinks the video should be loaded when the page loads. Can be "auto", "metadata" or "none".
unsupported
DataType
string
Required
false
Description
Add a message for old browsers like Internet Explorer 9 without video support.
media.vimeo ViewHelper <vhs:media.vimeo>
Renders HTML code to embed a video from Vimeo.
Arguments
additionalAttributes
DataType
mixed
Required
false
Description
Additional tag attributes. They will be added directly to the resulting HTML tag.
data
DataType
mixed
Required
false
Description
Additional data-* attributes. They will each be added with a "data-" prefix.
aria
DataType
mixed
Required
false
Description
Additional aria-* attributes. They will each be added with a "aria-" prefix.
class
DataType
string
Required
false
Description
CSS class(es) for this element
dir
DataType
string
Required
false
Description
Text direction for this HTML element. Allowed strings: "ltr" (left to right), "rtl" (right to left)
id
DataType
string
Required
false
Description
Unique (in this file) identifier for this HTML element.
lang
DataType
string
Required
false
Description
Language for this element. Use short names specified in RFC 1766
style
DataType
string
Required
false
Description
Individual CSS styles for this element
title
DataType
boolean
Default
true
Required
false
Description
Show the title on the video. Defaults to TRUE.
accesskey
DataType
string
Required
false
Description
Keyboard shortcut to access this element
tabindex
DataType
integer
Required
false
Description
Specifies the tab order of this element
onclick
DataType
string
Required
false
Description
JavaScript evaluated for the onclick event
videoId
DataType
string
Required
true
Description
Vimeo ID of the video to embed.
width
DataType
integer
Default
640
Required
false
Description
Width of the video in pixels. Defaults to 640 for 16:9 content.
height
DataType
integer
Default
360
Required
false
Description
Height of the video in pixels. Defaults to 360 for 16:9 content.
byline
DataType
boolean
Default
true
Required
false
Description
Show the users byline on the video. Defaults to TRUE.
portrait
DataType
boolean
Default
true
Required
false
Description
Show the users portrait on the video. Defaults to TRUE.
color
DataType
string
Default
'00adef'
Required
false
Description
Specify the color of the video controls. Defaults to 00adef. Make sure that you dont include the #.
autoplay
DataType
boolean
Required
false
Description
Play the video automatically on load. Defaults to FALSE. Note that this wont work on some devices.
loop
DataType
boolean
Required
false
Description
Play the video again when it reaches the end. Defaults to FALSE.
api
DataType
boolean
Required
false
Description
Set to TRUE to enable the Javascript API.
playerId
DataType
string
Required
false
Description
An unique id for the player that will be passed back with all Javascript API responses.
media.youtube ViewHelper <vhs:media.youtube>
Renders HTML code to embed a video from YouTube.
Arguments
additionalAttributes
DataType
mixed
Required
false
Description
Additional tag attributes. They will be added directly to the resulting HTML tag.
data
DataType
mixed
Required
false
Description
Additional data-* attributes. They will each be added with a "data-" prefix.
aria
DataType
mixed
Required
false
Description
Additional aria-* attributes. They will each be added with a "aria-" prefix.
class
DataType
string
Required
false
Description
CSS class(es) for this element
dir
DataType
string
Required
false
Description
Text direction for this HTML element. Allowed strings: "ltr" (left to right), "rtl" (right to left)
id
DataType
string
Required
false
Description
Unique (in this file) identifier for this HTML element.
lang
DataType
string
Required
false
Description
Language for this element. Use short names specified in RFC 1766
style
DataType
string
Required
false
Description
Individual CSS styles for this element
title
DataType
string
Required
false
Description
Tooltip text of element
accesskey
DataType
string
Required
false
Description
Keyboard shortcut to access this element
tabindex
DataType
integer
Required
false
Description
Specifies the tab order of this element
onclick
DataType
string
Required
false
Description
JavaScript evaluated for the onclick event
videoId
DataType
string
Required
true
Description
YouTube id of the video to embed.
width
DataType
integer
Default
640
Required
false
Description
Width of the video in pixels. Defaults to 640 for 16:9 content.
height
DataType
integer
Default
385
Required
false
Description
Height of the video in pixels. Defaults to 385 for 16:9 content.
autoplay
DataType
boolean
Required
false
Description
Play the video automatically on load. Defaults to FALSE.
legacyCode
DataType
boolean
Required
false
Description
Whether to use the legacy flash video code.
showRelated
DataType
boolean
Required
false
Description
Whether to show related videos after playing.
extendedPrivacy
DataType
boolean
Default
true
Required
false
Description
Whether to use cookie-less video player.
hideControl
DataType
boolean
Required
false
Description
Hide video player's control bar.
hideInfo
DataType
boolean
Required
false
Description
Hide video player's info bar.
enableJsApi
DataType
boolean
Required
false
Description
Enable YouTube JavaScript API
playlist
DataType
string
Required
false
Description
Comma seperated list of video IDs to be played.
loop
DataType
boolean
Required
false
Description
Play the video in a loop.
start
DataType
integer
Required
false
Description
Start playing after seconds.
end
DataType
integer
Required
false
Description
Stop playing after seconds.
lightTheme
DataType
boolean
Required
false
Description
Use the YouTube player's light theme.
videoQuality
DataType
string
Required
false
Description
Set the YouTube player's video quality (hd1080,hd720,highres,large,medium,small).
windowMode
DataType
string
Required
false
Description
Set the Window-Mode of the YouTube player (transparent,opaque). This is necessary for z-index handling in IE10/11.
Returns the height of the provided image file in pixels.
Arguments
src
DataType
mixed
Required
true
Description
Path to or id of the image file to determine info for. In case a FileReference is supplied, treatIdAsUid and treatIdAsReference will automatically be activated.
treatIdAsUid
DataType
boolean
Required
false
Description
If TRUE, the path argument is treated as a resource uid.
treatIdAsReference
DataType
boolean
Required
false
Description
If TRUE, the path argument is treated as a reference uid and will be resolved to a resource via sys_file_reference.
Path to or id of the image file to determine info for. In case a FileReference is supplied, treatIdAsUid and treatIdAsReference will automatically be activated.
treatIdAsUid
DataType
boolean
Required
false
Description
If TRUE, the path argument is treated as a resource uid.
treatIdAsReference
DataType
boolean
Required
false
Description
If TRUE, the path argument is treated as a reference uid and will be resolved to a resource via sys_file_reference.
Returns the width of the provided image file in pixels.
Arguments
src
DataType
mixed
Required
true
Description
Path to or id of the image file to determine info for. In case a FileReference is supplied, treatIdAsUid and treatIdAsReference will automatically be activated.
treatIdAsUid
DataType
boolean
Required
false
Description
If TRUE, the path argument is treated as a resource uid.
treatIdAsReference
DataType
boolean
Required
false
Description
If TRUE, the path argument is treated as a reference uid and will be resolved to a resource via sys_file_reference.
ViewHelper for rendering TYPO3 browse menus in Fluid
Renders links to browse inside a menu branch including
first, previous, next, last and up to the parent page.
Supports both automatic, tag-based rendering (which
defaults to ul > li with options to set both the
parent and child tag names. When using manual rendering
a range of support CSS classes are available along
with each page record.
Arguments
additionalAttributes
DataType
mixed
Required
false
Description
Additional tag attributes. They will be added directly to the resulting HTML tag.
data
DataType
mixed
Required
false
Description
Additional data-* attributes. They will each be added with a "data-" prefix.
aria
DataType
mixed
Required
false
Description
Additional aria-* attributes. They will each be added with a "aria-" prefix.
class
DataType
string
Required
false
Description
CSS class(es) for this element
dir
DataType
string
Required
false
Description
Text direction for this HTML element. Allowed strings: "ltr" (left to right), "rtl" (right to left)
id
DataType
string
Required
false
Description
Unique (in this file) identifier for this HTML element.
lang
DataType
string
Required
false
Description
Language for this element. Use short names specified in RFC 1766
style
DataType
string
Required
false
Description
Individual CSS styles for this element
title
DataType
string
Required
false
Description
Tooltip text of element
accesskey
DataType
string
Required
false
Description
Keyboard shortcut to access this element
tabindex
DataType
integer
Required
false
Description
Specifies the tab order of this element
onclick
DataType
string
Required
false
Description
JavaScript evaluated for the onclick event
forceClosingTag
DataType
boolean
Required
false
Description
If TRUE, forces the created tag to use a closing tag. If FALSE, allows self-closing tags.
hideIfEmpty
DataType
boolean
Required
false
Description
Hide the tag completely if there is no tag content
contenteditable
DataType
string
Required
false
Description
Specifies whether the contents of the element are editable.
contextmenu
DataType
string
Required
false
Description
The value of the id attribute on the menu with which to associate the element as a context menu.
draggable
DataType
string
Required
false
Description
Specifies whether the element is draggable.
dropzone
DataType
string
Required
false
Description
Specifies what types of content can be dropped on the element, and instructs the UA about which actions to take with content when it is dropped on the element.
translate
DataType
string
Required
false
Description
Specifies whether an elements attribute values and contents of its children are to be translated when the page is localized, or whether to leave them unchanged.
spellcheck
DataType
string
Required
false
Description
Specifies whether the element represents an element whose contents are subject to spell checking and grammar checking.
hidden
DataType
string
Required
false
Description
Specifies that the element represents an element that is not yet, or is no longer, relevant.
showAccessProtected
DataType
boolean
Required
false
Description
If TRUE links to access protected pages are always rendered regardless of user login status
classAccessProtected
DataType
string
Default
'protected'
Required
false
Description
Optional class name to add to links which are access protected
classAccessGranted
DataType
string
Default
'access-granted'
Required
false
Description
Optional class name to add to links which are access protected but access is actually granted
useShortcutUid
DataType
boolean
Required
false
Description
If TRUE, substitutes the link UID of a shortcut with the target page UID (and thus avoiding redirects) but does not change other data - which is done by using useShortcutData.
useShortcutTarget
DataType
boolean
Required
false
Description
Optional param for using shortcut target instead of shortcut itself for current link
useShortcutData
DataType
boolean
Required
false
Description
Shortcut to set useShortcutTarget and useShortcutData simultaneously
tagName
DataType
string
Default
'ul'
Required
false
Description
Tag name to use for enclosing container
tagNameChildren
DataType
string
Default
'li'
Required
false
Description
Tag name to use for child nodes surrounding links. If set to "a" enables non-wrapping mode.
entryLevel
DataType
integer
Required
false
Description
Optional entryLevel TS equivalent of the menu
levels
DataType
integer
Default
1
Required
false
Description
Number of levels to render - setting this to a number higher than 1 (one) will expand menu items that are active, to a depth of $levels starting from $entryLevel
expandAll
DataType
boolean
Required
false
Description
If TRUE and $levels > 1 then expands all (not just the active) menu items which have submenus
classFirst
DataType
string
Required
false
Description
Optional class name for the first menu elment
classLast
DataType
string
Required
false
Description
Optional class name for the last menu elment
classActive
DataType
string
Default
'active'
Required
false
Description
Optional class name to add to active links
classCurrent
DataType
string
Default
'current'
Required
false
Description
Optional class name to add to current link
substElementUid
DataType
boolean
Required
false
Description
Optional parameter for wrapping the link with the uid of the page
showHiddenInMenu
DataType
boolean
Required
false
Description
Include pages that are set to be hidden in menus
showCurrent
DataType
boolean
Default
true
Required
false
Description
If FALSE, does not display the current page
linkCurrent
DataType
boolean
Default
true
Required
false
Description
If FALSE, does not wrap the current page in a link
linkActive
DataType
boolean
Default
true
Required
false
Description
If FALSE, does not wrap with links the titles of pages that are active in the rootline
titleFields
DataType
string
Default
'nav_title,title'
Required
false
Description
CSV list of fields to use as link label - default is "nav_title,title", change to for example "tx_myext_somefield,subtitle,nav_title,title". The first field that contains text will be used. Field value resolved AFTER page field overlays.
includeAnchorTitle
DataType
boolean
Default
true
Required
false
Description
If TRUE, includes the page title as title attribute on the anchor.
includeSpacers
DataType
boolean
Required
false
Description
Wether or not to include menu spacers in the page select query
deferred
DataType
boolean
Required
false
Description
If TRUE, does not output the tag content UNLESS a v:page.menu.deferred child ViewHelper is both used and triggered. This allows you to create advanced conditions while still using automatic rendering
as
DataType
string
Default
'menu'
Required
false
Description
If used, stores the menu pages as an array in a variable named after this value and renders the tag content. If the tag content is empty automatic rendering is triggered.
rootLineAs
DataType
string
Default
'rootLine'
Required
false
Description
If used, stores the menu root line as an array in a variable named according to this value and renders the tag content - which means automatic rendering is disabled if this attribute is used
excludePages
DataType
mixed
Required
false
Description
Page UIDs to exclude from the menu. Can be CSV, array or an object implementing Traversable.
forceAbsoluteUrl
DataType
boolean
Required
false
Description
If TRUE, the menu will be rendered with absolute URLs
doktypes
DataType
mixed
Required
false
Description
DEPRECATED: Please use typical doktypes for starting points like shortcuts.
divider
DataType
string
Required
false
Description
Optional divider to insert between each menu item. Note that this does not mix well with automatic rendering due to the use of an ul > li structure
labelFirst
DataType
string
Default
'first'
Required
false
Description
Label for the "first" link
labelLast
DataType
string
Default
'last'
Required
false
Description
Label for the "last" link
labelPrevious
DataType
string
Default
'previous'
Required
false
Description
Label for the "previous" link
labelNext
DataType
string
Default
'next'
Required
false
Description
Label for the "next" link
labelUp
DataType
string
Default
'up'
Required
false
Description
Label for the "up" link
renderFirst
DataType
boolean
Default
true
Required
false
Description
If set to FALSE the "first" link will not be rendered
renderLast
DataType
boolean
Default
true
Required
false
Description
If set to FALSE the "last" link will not be rendered
renderUp
DataType
boolean
Default
true
Required
false
Description
If set to FALSE the "up" link will not be rendered
usePageTitles
DataType
boolean
Required
false
Description
If set to TRUE, uses target page titles instead of "next", "previous" etc. labels
pageUid
DataType
integer
Required
false
Description
Optional parent page UID to use as top level of menu. If unspecified, current page UID is used
currentPageUid
DataType
integer
Required
false
Description
Optional page UID to use as current page. If unspecified, current page UID from globals is used
menu.deferred ViewHelper <vhs:menu.deferred>
Page: Deferred menu rendering ViewHelper
Place this ViewHelper inside any other ViewHelper which
has been configured with the deferred attribute set to
TRUE - this will cause the output of the parent to only
contain the content of this ViewHelper.
Arguments
additionalAttributes
DataType
mixed
Required
false
Description
Additional tag attributes. They will be added directly to the resulting HTML tag.
data
DataType
mixed
Required
false
Description
Additional data-* attributes. They will each be added with a "data-" prefix.
aria
DataType
mixed
Required
false
Description
Additional aria-* attributes. They will each be added with a "aria-" prefix.
class
DataType
string
Required
false
Description
CSS class(es) for this element
dir
DataType
string
Required
false
Description
Text direction for this HTML element. Allowed strings: "ltr" (left to right), "rtl" (right to left)
id
DataType
string
Required
false
Description
Unique (in this file) identifier for this HTML element.
lang
DataType
string
Required
false
Description
Language for this element. Use short names specified in RFC 1766
style
DataType
string
Required
false
Description
Individual CSS styles for this element
title
DataType
string
Required
false
Description
Tooltip text of element
accesskey
DataType
string
Required
false
Description
Keyboard shortcut to access this element
tabindex
DataType
integer
Required
false
Description
Specifies the tab order of this element
onclick
DataType
string
Required
false
Description
JavaScript evaluated for the onclick event
forceClosingTag
DataType
boolean
Required
false
Description
If TRUE, forces the created tag to use a closing tag. If FALSE, allows self-closing tags.
hideIfEmpty
DataType
boolean
Required
false
Description
Hide the tag completely if there is no tag content
contenteditable
DataType
string
Required
false
Description
Specifies whether the contents of the element are editable.
contextmenu
DataType
string
Required
false
Description
The value of the id attribute on the menu with which to associate the element as a context menu.
draggable
DataType
string
Required
false
Description
Specifies whether the element is draggable.
dropzone
DataType
string
Required
false
Description
Specifies what types of content can be dropped on the element, and instructs the UA about which actions to take with content when it is dropped on the element.
translate
DataType
string
Required
false
Description
Specifies whether an elements attribute values and contents of its children are to be translated when the page is localized, or whether to leave them unchanged.
spellcheck
DataType
string
Required
false
Description
Specifies whether the element represents an element whose contents are subject to spell checking and grammar checking.
hidden
DataType
string
Required
false
Description
Specifies that the element represents an element that is not yet, or is no longer, relevant.
showAccessProtected
DataType
boolean
Required
false
Description
If TRUE links to access protected pages are always rendered regardless of user login status
classAccessProtected
DataType
string
Default
'protected'
Required
false
Description
Optional class name to add to links which are access protected
classAccessGranted
DataType
string
Default
'access-granted'
Required
false
Description
Optional class name to add to links which are access protected but access is actually granted
useShortcutUid
DataType
boolean
Required
false
Description
If TRUE, substitutes the link UID of a shortcut with the target page UID (and thus avoiding redirects) but does not change other data - which is done by using useShortcutData.
useShortcutTarget
DataType
boolean
Required
false
Description
Optional param for using shortcut target instead of shortcut itself for current link
useShortcutData
DataType
boolean
Required
false
Description
Shortcut to set useShortcutTarget and useShortcutData simultaneously
tagName
DataType
string
Default
'ul'
Required
false
Description
Tag name to use for enclosing container
tagNameChildren
DataType
string
Default
'li'
Required
false
Description
Tag name to use for child nodes surrounding links. If set to "a" enables non-wrapping mode.
entryLevel
DataType
integer
Required
false
Description
Optional entryLevel TS equivalent of the menu
levels
DataType
integer
Default
1
Required
false
Description
Number of levels to render - setting this to a number higher than 1 (one) will expand menu items that are active, to a depth of $levels starting from $entryLevel
expandAll
DataType
boolean
Required
false
Description
If TRUE and $levels > 1 then expands all (not just the active) menu items which have submenus
classFirst
DataType
string
Required
false
Description
Optional class name for the first menu elment
classLast
DataType
string
Required
false
Description
Optional class name for the last menu elment
classActive
DataType
string
Default
'active'
Required
false
Description
Optional class name to add to active links
classCurrent
DataType
string
Default
'current'
Required
false
Description
Optional class name to add to current link
substElementUid
DataType
boolean
Required
false
Description
Optional parameter for wrapping the link with the uid of the page
showHiddenInMenu
DataType
boolean
Required
false
Description
Include pages that are set to be hidden in menus
showCurrent
DataType
boolean
Default
true
Required
false
Description
If FALSE, does not display the current page
linkCurrent
DataType
boolean
Default
true
Required
false
Description
If FALSE, does not wrap the current page in a link
linkActive
DataType
boolean
Default
true
Required
false
Description
If FALSE, does not wrap with links the titles of pages that are active in the rootline
titleFields
DataType
string
Default
'nav_title,title'
Required
false
Description
CSV list of fields to use as link label - default is "nav_title,title", change to for example "tx_myext_somefield,subtitle,nav_title,title". The first field that contains text will be used. Field value resolved AFTER page field overlays.
includeAnchorTitle
DataType
boolean
Default
true
Required
false
Description
If TRUE, includes the page title as title attribute on the anchor.
includeSpacers
DataType
boolean
Required
false
Description
Wether or not to include menu spacers in the page select query
deferred
DataType
boolean
Required
false
Description
If TRUE, does not output the tag content UNLESS a v:page.menu.deferred child ViewHelper is both used and triggered. This allows you to create advanced conditions while still using automatic rendering
as
DataType
string
Required
false
Description
If used, stores the menu pages as an array in a variable named according to this value and renders the tag content - which means automatic rendering is disabled if this attribute is used
rootLineAs
DataType
string
Default
'rootLine'
Required
false
Description
If used, stores the menu root line as an array in a variable named according to this value and renders the tag content - which means automatic rendering is disabled if this attribute is used
excludePages
DataType
mixed
Required
false
Description
Page UIDs to exclude from the menu. Can be CSV, array or an object implementing Traversable.
forceAbsoluteUrl
DataType
boolean
Required
false
Description
If TRUE, the menu will be rendered with absolute URLs
doktypes
DataType
mixed
Required
false
Description
DEPRECATED: Please use typical doktypes for starting points like shortcuts.
divider
DataType
string
Required
false
Description
Optional divider to insert between each menu item. Note that this does not mix well with automatic rendering due to the use of an ul > li structure
menu.directory ViewHelper <vhs:menu.directory>
Page: Directory Menu ViewHelper
ViewHelper for rendering TYPO3 list menus in Fluid
Supports both automatic, tag-based rendering (which
defaults to ul > li with options to set both the
parent and child tag names. When using manual rendering
a range of support CSS classes are available along
with each page record.
Arguments
additionalAttributes
DataType
mixed
Required
false
Description
Additional tag attributes. They will be added directly to the resulting HTML tag.
data
DataType
mixed
Required
false
Description
Additional data-* attributes. They will each be added with a "data-" prefix.
aria
DataType
mixed
Required
false
Description
Additional aria-* attributes. They will each be added with a "aria-" prefix.
class
DataType
string
Required
false
Description
CSS class(es) for this element
dir
DataType
string
Required
false
Description
Text direction for this HTML element. Allowed strings: "ltr" (left to right), "rtl" (right to left)
id
DataType
string
Required
false
Description
Unique (in this file) identifier for this HTML element.
lang
DataType
string
Required
false
Description
Language for this element. Use short names specified in RFC 1766
style
DataType
string
Required
false
Description
Individual CSS styles for this element
title
DataType
string
Required
false
Description
Tooltip text of element
accesskey
DataType
string
Required
false
Description
Keyboard shortcut to access this element
tabindex
DataType
integer
Required
false
Description
Specifies the tab order of this element
onclick
DataType
string
Required
false
Description
JavaScript evaluated for the onclick event
forceClosingTag
DataType
boolean
Required
false
Description
If TRUE, forces the created tag to use a closing tag. If FALSE, allows self-closing tags.
hideIfEmpty
DataType
boolean
Required
false
Description
Hide the tag completely if there is no tag content
contenteditable
DataType
string
Required
false
Description
Specifies whether the contents of the element are editable.
contextmenu
DataType
string
Required
false
Description
The value of the id attribute on the menu with which to associate the element as a context menu.
draggable
DataType
string
Required
false
Description
Specifies whether the element is draggable.
dropzone
DataType
string
Required
false
Description
Specifies what types of content can be dropped on the element, and instructs the UA about which actions to take with content when it is dropped on the element.
translate
DataType
string
Required
false
Description
Specifies whether an elements attribute values and contents of its children are to be translated when the page is localized, or whether to leave them unchanged.
spellcheck
DataType
string
Required
false
Description
Specifies whether the element represents an element whose contents are subject to spell checking and grammar checking.
hidden
DataType
string
Required
false
Description
Specifies that the element represents an element that is not yet, or is no longer, relevant.
showAccessProtected
DataType
boolean
Required
false
Description
If TRUE links to access protected pages are always rendered regardless of user login status
classAccessProtected
DataType
string
Default
'protected'
Required
false
Description
Optional class name to add to links which are access protected
classAccessGranted
DataType
string
Default
'access-granted'
Required
false
Description
Optional class name to add to links which are access protected but access is actually granted
useShortcutUid
DataType
boolean
Required
false
Description
If TRUE, substitutes the link UID of a shortcut with the target page UID (and thus avoiding redirects) but does not change other data - which is done by using useShortcutData.
useShortcutTarget
DataType
boolean
Required
false
Description
Optional param for using shortcut target instead of shortcut itself for current link
useShortcutData
DataType
boolean
Required
false
Description
Shortcut to set useShortcutTarget and useShortcutData simultaneously
tagName
DataType
string
Default
'ul'
Required
false
Description
Tag name to use for enclosing container
tagNameChildren
DataType
string
Default
'li'
Required
false
Description
Tag name to use for child nodes surrounding links. If set to "a" enables non-wrapping mode.
entryLevel
DataType
integer
Required
false
Description
Optional entryLevel TS equivalent of the menu
levels
DataType
integer
Default
1
Required
false
Description
Number of levels to render - setting this to a number higher than 1 (one) will expand menu items that are active, to a depth of $levels starting from $entryLevel
expandAll
DataType
boolean
Required
false
Description
If TRUE and $levels > 1 then expands all (not just the active) menu items which have submenus
classFirst
DataType
string
Required
false
Description
Optional class name for the first menu elment
classLast
DataType
string
Required
false
Description
Optional class name for the last menu elment
classActive
DataType
string
Default
'active'
Required
false
Description
Optional class name to add to active links
classCurrent
DataType
string
Default
'current'
Required
false
Description
Optional class name to add to current link
substElementUid
DataType
boolean
Required
false
Description
Optional parameter for wrapping the link with the uid of the page
showHiddenInMenu
DataType
boolean
Required
false
Description
Include pages that are set to be hidden in menus
showCurrent
DataType
boolean
Default
true
Required
false
Description
If FALSE, does not display the current page
linkCurrent
DataType
boolean
Default
true
Required
false
Description
If FALSE, does not wrap the current page in a link
linkActive
DataType
boolean
Default
true
Required
false
Description
If FALSE, does not wrap with links the titles of pages that are active in the rootline
titleFields
DataType
string
Default
'nav_title,title'
Required
false
Description
CSV list of fields to use as link label - default is "nav_title,title", change to for example "tx_myext_somefield,subtitle,nav_title,title". The first field that contains text will be used. Field value resolved AFTER page field overlays.
includeAnchorTitle
DataType
boolean
Default
true
Required
false
Description
If TRUE, includes the page title as title attribute on the anchor.
includeSpacers
DataType
boolean
Required
false
Description
Wether or not to include menu spacers in the page select query
deferred
DataType
boolean
Required
false
Description
If TRUE, does not output the tag content UNLESS a v:page.menu.deferred child ViewHelper is both used and triggered. This allows you to create advanced conditions while still using automatic rendering
as
DataType
string
Default
'menu'
Required
false
Description
If used, stores the menu pages as an array in a variable named after this value and renders the tag content. If the tag content is empty automatic rendering is triggered.
rootLineAs
DataType
string
Default
'rootLine'
Required
false
Description
If used, stores the menu root line as an array in a variable named according to this value and renders the tag content - which means automatic rendering is disabled if this attribute is used
excludePages
DataType
mixed
Required
false
Description
Page UIDs to exclude from the menu. Can be CSV, array or an object implementing Traversable.
forceAbsoluteUrl
DataType
boolean
Required
false
Description
If TRUE, the menu will be rendered with absolute URLs
doktypes
DataType
mixed
Required
false
Description
DEPRECATED: Please use typical doktypes for starting points like shortcuts.
divider
DataType
string
Required
false
Description
Optional divider to insert between each menu item. Note that this does not mix well with automatic rendering due to the use of an ul > li structure
pages
DataType
mixed
Required
true
Description
Parent page UIDs of subpages to include in the menu. Can be CSV, array or an object implementing Traversable.
menu.list ViewHelper <vhs:menu.list>
Page: List Menu ViewHelper
ViewHelper for rendering TYPO3 list menus in Fluid
Supports both automatic, tag-based rendering (which
defaults to ul > li with options to set both the
parent and child tag names. When using manual rendering
a range of support CSS classes are available along
with each page record.
Arguments
additionalAttributes
DataType
mixed
Required
false
Description
Additional tag attributes. They will be added directly to the resulting HTML tag.
data
DataType
mixed
Required
false
Description
Additional data-* attributes. They will each be added with a "data-" prefix.
aria
DataType
mixed
Required
false
Description
Additional aria-* attributes. They will each be added with a "aria-" prefix.
class
DataType
string
Required
false
Description
CSS class(es) for this element
dir
DataType
string
Required
false
Description
Text direction for this HTML element. Allowed strings: "ltr" (left to right), "rtl" (right to left)
id
DataType
string
Required
false
Description
Unique (in this file) identifier for this HTML element.
lang
DataType
string
Required
false
Description
Language for this element. Use short names specified in RFC 1766
style
DataType
string
Required
false
Description
Individual CSS styles for this element
title
DataType
string
Required
false
Description
Tooltip text of element
accesskey
DataType
string
Required
false
Description
Keyboard shortcut to access this element
tabindex
DataType
integer
Required
false
Description
Specifies the tab order of this element
onclick
DataType
string
Required
false
Description
JavaScript evaluated for the onclick event
forceClosingTag
DataType
boolean
Required
false
Description
If TRUE, forces the created tag to use a closing tag. If FALSE, allows self-closing tags.
hideIfEmpty
DataType
boolean
Required
false
Description
Hide the tag completely if there is no tag content
contenteditable
DataType
string
Required
false
Description
Specifies whether the contents of the element are editable.
contextmenu
DataType
string
Required
false
Description
The value of the id attribute on the menu with which to associate the element as a context menu.
draggable
DataType
string
Required
false
Description
Specifies whether the element is draggable.
dropzone
DataType
string
Required
false
Description
Specifies what types of content can be dropped on the element, and instructs the UA about which actions to take with content when it is dropped on the element.
translate
DataType
string
Required
false
Description
Specifies whether an elements attribute values and contents of its children are to be translated when the page is localized, or whether to leave them unchanged.
spellcheck
DataType
string
Required
false
Description
Specifies whether the element represents an element whose contents are subject to spell checking and grammar checking.
hidden
DataType
string
Required
false
Description
Specifies that the element represents an element that is not yet, or is no longer, relevant.
showAccessProtected
DataType
boolean
Required
false
Description
If TRUE links to access protected pages are always rendered regardless of user login status
classAccessProtected
DataType
string
Default
'protected'
Required
false
Description
Optional class name to add to links which are access protected
classAccessGranted
DataType
string
Default
'access-granted'
Required
false
Description
Optional class name to add to links which are access protected but access is actually granted
useShortcutUid
DataType
boolean
Required
false
Description
If TRUE, substitutes the link UID of a shortcut with the target page UID (and thus avoiding redirects) but does not change other data - which is done by using useShortcutData.
useShortcutTarget
DataType
boolean
Required
false
Description
Optional param for using shortcut target instead of shortcut itself for current link
useShortcutData
DataType
boolean
Required
false
Description
Shortcut to set useShortcutTarget and useShortcutData simultaneously
tagName
DataType
string
Default
'ul'
Required
false
Description
Tag name to use for enclosing container
tagNameChildren
DataType
string
Default
'li'
Required
false
Description
Tag name to use for child nodes surrounding links. If set to "a" enables non-wrapping mode.
entryLevel
DataType
integer
Required
false
Description
Optional entryLevel TS equivalent of the menu
levels
DataType
integer
Default
1
Required
false
Description
Number of levels to render - setting this to a number higher than 1 (one) will expand menu items that are active, to a depth of $levels starting from $entryLevel
expandAll
DataType
boolean
Required
false
Description
If TRUE and $levels > 1 then expands all (not just the active) menu items which have submenus
classFirst
DataType
string
Required
false
Description
Optional class name for the first menu elment
classLast
DataType
string
Required
false
Description
Optional class name for the last menu elment
classActive
DataType
string
Default
'active'
Required
false
Description
Optional class name to add to active links
classCurrent
DataType
string
Default
'current'
Required
false
Description
Optional class name to add to current link
substElementUid
DataType
boolean
Required
false
Description
Optional parameter for wrapping the link with the uid of the page
showHiddenInMenu
DataType
boolean
Required
false
Description
Include pages that are set to be hidden in menus
showCurrent
DataType
boolean
Default
true
Required
false
Description
If FALSE, does not display the current page
linkCurrent
DataType
boolean
Default
true
Required
false
Description
If FALSE, does not wrap the current page in a link
linkActive
DataType
boolean
Default
true
Required
false
Description
If FALSE, does not wrap with links the titles of pages that are active in the rootline
titleFields
DataType
string
Default
'nav_title,title'
Required
false
Description
CSV list of fields to use as link label - default is "nav_title,title", change to for example "tx_myext_somefield,subtitle,nav_title,title". The first field that contains text will be used. Field value resolved AFTER page field overlays.
includeAnchorTitle
DataType
boolean
Default
true
Required
false
Description
If TRUE, includes the page title as title attribute on the anchor.
includeSpacers
DataType
boolean
Required
false
Description
Wether or not to include menu spacers in the page select query
deferred
DataType
boolean
Required
false
Description
If TRUE, does not output the tag content UNLESS a v:page.menu.deferred child ViewHelper is both used and triggered. This allows you to create advanced conditions while still using automatic rendering
as
DataType
string
Default
'menu'
Required
false
Description
If used, stores the menu pages as an array in a variable named after this value and renders the tag content. If the tag content is empty automatic rendering is triggered.
rootLineAs
DataType
string
Default
'rootLine'
Required
false
Description
If used, stores the menu root line as an array in a variable named according to this value and renders the tag content - which means automatic rendering is disabled if this attribute is used
excludePages
DataType
mixed
Required
false
Description
Page UIDs to exclude from the menu. Can be CSV, array or an object implementing Traversable.
forceAbsoluteUrl
DataType
boolean
Required
false
Description
If TRUE, the menu will be rendered with absolute URLs
doktypes
DataType
mixed
Required
false
Description
DEPRECATED: Please use typical doktypes for starting points like shortcuts.
divider
DataType
string
Required
false
Description
Optional divider to insert between each menu item. Note that this does not mix well with automatic rendering due to the use of an ul > li structure
pages
DataType
mixed
Required
true
Description
Page UIDs to include in the menu. Can be CSV, array or an object implementing Traversable.
menu.sub ViewHelper <vhs:menu.sub>
Page: Auto Sub Menu ViewHelper
Recycles the parent menu ViewHelper instance, resetting the
page UID used as starting point and repeating rendering of
the exact same tag content.
Used in custom menu rendering to indicate where a submenu is
to be rendered; accepts only a single argument called pageUid
which defines the new starting page UID that is used in the
recycled parent menu instance.
Arguments
pageUid
DataType
mixed
Required
true
Description
Page UID to be overridden in the recycled rendering of the parent instance, if one exists
Displays nested content or "then" child once, then sets a
cookie with $ttl, optionally locked to domain name, which
makes the condition return FALSE as long as the cookie exists.
"Once"-style ViewHelpers are purposed to only display their
nested content once per XYZ, where the XYZ depends on the
specific type of ViewHelper (session, cookie etc).
In addition the ViewHelper is a ConditionViewHelper, which
means you can utilize the f:then and f:else child nodes as
well as the "then" and "else" arguments.
Arguments
then
DataType
mixed
Required
false
Description
Value to be returned if the condition if met.
else
DataType
mixed
Required
false
Description
Value to be returned if the condition if not met.
identifier
DataType
string
Required
false
Description
Identity of this condition - if used in other places, the condition applies to the same identity in the storage (i.e. cookie name or session key)
lockToDomain
DataType
boolean
Required
false
Description
If TRUE, locks this condition to a specific domain, i.e. the storage of $identity is associated with a domain. If same identity is also used without domain lock, it matches any domain locked condition
ttl
DataType
integer
Default
86400
Required
false
Description
Time-to-live for skip registration, number of seconds. After this expires the registration is unset
once.instance ViewHelper <vhs:once.instance>
Once: Instance
Displays nested content or "then" child once per instance
of the content element or plugin being rendered, as identified
by the contentObject UID (or globally if no contentObject
is associated).
"Once"-style ViewHelpers are purposed to only display their
nested content once per XYZ, where the XYZ depends on the
specific type of ViewHelper (session, cookie etc).
In addition the ViewHelper is a ConditionViewHelper, which
means you can utilize the f:then and f:else child nodes as
well as the "then" and "else" arguments.
Arguments
then
DataType
mixed
Required
false
Description
Value to be returned if the condition if met.
else
DataType
mixed
Required
false
Description
Value to be returned if the condition if not met.
identifier
DataType
string
Required
false
Description
Identity of this condition - if used in other places, the condition applies to the same identity in the storage (i.e. cookie name or session key)
lockToDomain
DataType
boolean
Required
false
Description
If TRUE, locks this condition to a specific domain, i.e. the storage of $identity is associated with a domain. If same identity is also used without domain lock, it matches any domain locked condition
ttl
DataType
integer
Default
86400
Required
false
Description
Time-to-live for skip registration, number of seconds. After this expires the registration is unset
once.session ViewHelper <vhs:once.session>
Once: Session
Displays nested content or "then" child once per session.
"Once"-style ViewHelpers are purposed to only display their
nested content once per XYZ, where the XYZ depends on the
specific type of ViewHelper (session, cookie etc).
In addition the ViewHelper is a ConditionViewHelper, which
means you can utilize the f:then and f:else child nodes as
well as the "then" and "else" arguments.
Arguments
then
DataType
mixed
Required
false
Description
Value to be returned if the condition if met.
else
DataType
mixed
Required
false
Description
Value to be returned if the condition if not met.
identifier
DataType
string
Required
false
Description
Identity of this condition - if used in other places, the condition applies to the same identity in the storage (i.e. cookie name or session key)
lockToDomain
DataType
boolean
Required
false
Description
If TRUE, locks this condition to a specific domain, i.e. the storage of $identity is associated with a domain. If same identity is also used without domain lock, it matches any domain locked condition
ttl
DataType
integer
Default
86400
Required
false
Description
Time-to-live for skip registration, number of seconds. After this expires the registration is unset
once.standard ViewHelper <vhs:once.standard>
Once: Standard
Displays nested content or "then" child once per rendering
stack - i.e. per Layout, or Template if no Layout is used.
"Once"-style ViewHelpers are purposed to only display their
nested content once per XYZ, where the XYZ depends on the
specific type of ViewHelper (session, cookie etc).
In addition the ViewHelper is a ConditionViewHelper, which
means you can utilize the f:then and f:else child nodes as
well as the "then" and "else" arguments.
Arguments
then
DataType
mixed
Required
false
Description
Value to be returned if the condition if met.
else
DataType
mixed
Required
false
Description
Value to be returned if the condition if not met.
identifier
DataType
string
Required
false
Description
Identity of this condition - if used in other places, the condition applies to the same identity in the storage (i.e. cookie name or session key)
lockToDomain
DataType
boolean
Required
false
Description
If TRUE, locks this condition to a specific domain, i.e. the storage of $identity is associated with a domain. If same identity is also used without domain lock, it matches any domain locked condition
ttl
DataType
integer
Default
86400
Required
false
Description
Time-to-live for skip registration, number of seconds. After this expires the registration is unset
Returns a full, absolute URL to this page with all arguments.
Arguments
This ViewHelper has no arguments.
page.breadCrumb ViewHelper <vhs:page.breadCrumb>
ViewHelper to make a breadcrumb link set from a pageUid, automatic or manual.
Arguments
additionalAttributes
DataType
mixed
Required
false
Description
Additional tag attributes. They will be added directly to the resulting HTML tag.
data
DataType
mixed
Required
false
Description
Additional data-* attributes. They will each be added with a "data-" prefix.
aria
DataType
mixed
Required
false
Description
Additional aria-* attributes. They will each be added with a "aria-" prefix.
class
DataType
string
Required
false
Description
CSS class(es) for this element
dir
DataType
string
Required
false
Description
Text direction for this HTML element. Allowed strings: "ltr" (left to right), "rtl" (right to left)
id
DataType
string
Required
false
Description
Unique (in this file) identifier for this HTML element.
lang
DataType
string
Required
false
Description
Language for this element. Use short names specified in RFC 1766
style
DataType
string
Required
false
Description
Individual CSS styles for this element
title
DataType
string
Required
false
Description
Tooltip text of element
accesskey
DataType
string
Required
false
Description
Keyboard shortcut to access this element
tabindex
DataType
integer
Required
false
Description
Specifies the tab order of this element
onclick
DataType
string
Required
false
Description
JavaScript evaluated for the onclick event
forceClosingTag
DataType
boolean
Required
false
Description
If TRUE, forces the created tag to use a closing tag. If FALSE, allows self-closing tags.
hideIfEmpty
DataType
boolean
Required
false
Description
Hide the tag completely if there is no tag content
contenteditable
DataType
string
Required
false
Description
Specifies whether the contents of the element are editable.
contextmenu
DataType
string
Required
false
Description
The value of the id attribute on the menu with which to associate the element as a context menu.
draggable
DataType
string
Required
false
Description
Specifies whether the element is draggable.
dropzone
DataType
string
Required
false
Description
Specifies what types of content can be dropped on the element, and instructs the UA about which actions to take with content when it is dropped on the element.
translate
DataType
string
Required
false
Description
Specifies whether an elements attribute values and contents of its children are to be translated when the page is localized, or whether to leave them unchanged.
spellcheck
DataType
string
Required
false
Description
Specifies whether the element represents an element whose contents are subject to spell checking and grammar checking.
hidden
DataType
string
Required
false
Description
Specifies that the element represents an element that is not yet, or is no longer, relevant.
showAccessProtected
DataType
boolean
Required
false
Description
If TRUE links to access protected pages are always rendered regardless of user login status
classAccessProtected
DataType
string
Default
'protected'
Required
false
Description
Optional class name to add to links which are access protected
classAccessGranted
DataType
string
Default
'access-granted'
Required
false
Description
Optional class name to add to links which are access protected but access is actually granted
useShortcutUid
DataType
boolean
Required
false
Description
If TRUE, substitutes the link UID of a shortcut with the target page UID (and thus avoiding redirects) but does not change other data - which is done by using useShortcutData.
useShortcutTarget
DataType
boolean
Required
false
Description
Optional param for using shortcut target instead of shortcut itself for current link
useShortcutData
DataType
boolean
Required
false
Description
Shortcut to set useShortcutTarget and useShortcutData simultaneously
tagName
DataType
string
Default
'ul'
Required
false
Description
Tag name to use for enclosing container
tagNameChildren
DataType
string
Default
'li'
Required
false
Description
Tag name to use for child nodes surrounding links. If set to "a" enables non-wrapping mode.
entryLevel
DataType
integer
Required
false
Description
Optional entryLevel TS equivalent of the menu
levels
DataType
integer
Default
1
Required
false
Description
Number of levels to render - setting this to a number higher than 1 (one) will expand menu items that are active, to a depth of $levels starting from $entryLevel
expandAll
DataType
boolean
Required
false
Description
If TRUE and $levels > 1 then expands all (not just the active) menu items which have submenus
classFirst
DataType
string
Required
false
Description
Optional class name for the first menu elment
classLast
DataType
string
Required
false
Description
Optional class name for the last menu elment
classActive
DataType
string
Default
'active'
Required
false
Description
Optional class name to add to active links
classCurrent
DataType
string
Default
'current'
Required
false
Description
Optional class name to add to current link
substElementUid
DataType
boolean
Required
false
Description
Optional parameter for wrapping the link with the uid of the page
showHiddenInMenu
DataType
boolean
Required
false
Description
Include pages that are set to be hidden in menus
showCurrent
DataType
boolean
Default
true
Required
false
Description
If FALSE, does not display the current page
linkCurrent
DataType
boolean
Default
true
Required
false
Description
If FALSE, does not wrap the current page in a link
linkActive
DataType
boolean
Default
true
Required
false
Description
If FALSE, does not wrap with links the titles of pages that are active in the rootline
titleFields
DataType
string
Default
'nav_title,title'
Required
false
Description
CSV list of fields to use as link label - default is "nav_title,title", change to for example "tx_myext_somefield,subtitle,nav_title,title". The first field that contains text will be used. Field value resolved AFTER page field overlays.
includeAnchorTitle
DataType
boolean
Default
true
Required
false
Description
If TRUE, includes the page title as title attribute on the anchor.
includeSpacers
DataType
boolean
Required
false
Description
Wether or not to include menu spacers in the page select query
deferred
DataType
boolean
Required
false
Description
If TRUE, does not output the tag content UNLESS a v:page.menu.deferred child ViewHelper is both used and triggered. This allows you to create advanced conditions while still using automatic rendering
as
DataType
string
Default
'breadcrumb'
Required
false
Description
If used, stores the menu pages as an array in a variable named after this value and renders the tag content. If the tag content is empty automatic rendering is triggered.
rootLineAs
DataType
string
Default
'rootLine'
Required
false
Description
If used, stores the menu root line as an array in a variable named according to this value and renders the tag content - which means automatic rendering is disabled if this attribute is used
excludePages
DataType
mixed
Required
false
Description
Page UIDs to exclude from the menu. Can be CSV, array or an object implementing Traversable.
forceAbsoluteUrl
DataType
boolean
Required
false
Description
If TRUE, the menu will be rendered with absolute URLs
doktypes
DataType
mixed
Required
false
Description
DEPRECATED: Please use typical doktypes for starting points like shortcuts.
divider
DataType
string
Required
false
Description
Optional divider to insert between each menu item. Note that this does not mix well with automatic rendering due to the use of an ul > li structure
pageUid
DataType
integer
Required
false
Description
Optional parent page UID to use as top level of menu. If left out will be detected from rootLine using $entryLevel.
endLevel
DataType
integer
Required
false
Description
Optional deepest level of rendering. If left out all levels up to the current are rendered.
page.footer ViewHelper <vhs:page.footer>
ViewHelper used to place header blocks in document footer
Arguments
content
DataType
string
Required
false
Description
Content to insert in header/footer
path
DataType
string
Required
false
Description
If not using tag content, specify path to file here
external
DataType
boolean
Required
false
Description
If TRUE and standalone, includes the file as raw URL. If TRUE and not standalone then downloads the file and merges it when building Assets
name
DataType
string
Required
false
Description
Optional name of the content. If multiple occurrences of the same name happens, behavior is defined by argument "overwrite"
overwrite
DataType
boolean
Default
true
Required
false
Description
If set to FALSE and a relocated string with "name" already exists, does not overwrite the existing relocated string. Default behavior is to overwrite.
dependencies
DataType
string
Required
false
Description
CSV list of other named assets upon which this asset depends. When included, this asset will always load after its dependencies
group
DataType
string
Default
'fluid'
Required
false
Description
Optional name of a logical group (created dynamically just by using the name) to which this particular asset belongs.
debug
DataType
boolean
Required
false
Description
If TRUE, outputs information about this ViewHelper when the tag is used. Two master debug switches exist in TypoScript; see documentation about Page / Asset ViewHelper
standalone
DataType
boolean
Required
false
Description
If TRUE, excludes this Asset from any concatenation which may be applied
rewrite
DataType
boolean
Default
true
Required
false
Description
If FALSE, this Asset will be included as is without any processing of contained urls
fluid
DataType
boolean
Required
false
Description
If TRUE, renders this (standalone or external) Asset as if it were a Fluid template, passing along values of the "variables" attribute or every available template variable if "variables" not specified
variables
DataType
mixed
Required
false
Description
An optional array of arguments which you use inside the Asset, be it standalone or inline. Use this argument to ensure your Asset filenames are only reused when all variables used in the Asset are the same
movable
DataType
boolean
Default
true
Required
false
Description
If TRUE, allows this Asset to be included in the document footer rather than the header. Should never be allowed for CSS.
trim
DataType
boolean
Required
false
Description
DEPRECATED. Trim is no longer supported. Setting this to TRUE doesn't do anything.
namedChunks
DataType
boolean
Required
false
Description
If FALSE, hides the comment containing the name of each of Assets which is merged in a merged file. Disable to avoid a bit more output at the cost of transparency
page.header ViewHelper <vhs:page.header>
ViewHelper used to place header blocks in document header
Arguments
content
DataType
string
Required
false
Description
Content to insert in header/footer
path
DataType
string
Required
false
Description
If not using tag content, specify path to file here
external
DataType
boolean
Required
false
Description
If TRUE and standalone, includes the file as raw URL. If TRUE and not standalone then downloads the file and merges it when building Assets
name
DataType
string
Required
false
Description
Optional name of the content. If multiple occurrences of the same name happens, behavior is defined by argument "overwrite"
overwrite
DataType
boolean
Default
true
Required
false
Description
If set to FALSE and a relocated string with "name" already exists, does not overwrite the existing relocated string. Default behavior is to overwrite.
dependencies
DataType
string
Required
false
Description
CSV list of other named assets upon which this asset depends. When included, this asset will always load after its dependencies
group
DataType
string
Default
'fluid'
Required
false
Description
Optional name of a logical group (created dynamically just by using the name) to which this particular asset belongs.
debug
DataType
boolean
Required
false
Description
If TRUE, outputs information about this ViewHelper when the tag is used. Two master debug switches exist in TypoScript; see documentation about Page / Asset ViewHelper
standalone
DataType
boolean
Required
false
Description
If TRUE, excludes this Asset from any concatenation which may be applied
rewrite
DataType
boolean
Default
true
Required
false
Description
If FALSE, this Asset will be included as is without any processing of contained urls
fluid
DataType
boolean
Required
false
Description
If TRUE, renders this (standalone or external) Asset as if it were a Fluid template, passing along values of the "variables" attribute or every available template variable if "variables" not specified
variables
DataType
mixed
Required
false
Description
An optional array of arguments which you use inside the Asset, be it standalone or inline. Use this argument to ensure your Asset filenames are only reused when all variables used in the Asset are the same
movable
DataType
boolean
Default
true
Required
false
Description
If TRUE, allows this Asset to be included in the document footer rather than the header. Should never be allowed for CSS.
trim
DataType
boolean
Required
false
Description
DEPRECATED. Trim is no longer supported. Setting this to TRUE doesn't do anything.
namedChunks
DataType
boolean
Required
false
Description
If FALSE, hides the comment containing the name of each of Assets which is merged in a merged file. Disable to avoid a bit more output at the cost of transparency
page.info ViewHelper <vhs:page.info>
ViewHelper to access data of the current page record.
Does not work in the TYPO3 backend.
Arguments
as
DataType
string
Required
false
Description
Template variable name to assign; if not specified the ViewHelper returns the variable instead.
pageUid
DataType
integer
Required
false
Description
If specified, this UID will be used to fetch page data instead of using the current page.
field
DataType
string
Required
false
Description
If specified, only this field will be returned/assigned instead of the complete page record.
ViewHelper for rendering TYPO3 menus in Fluid
Require the extension static_info_table.
Arguments
additionalAttributes
DataType
mixed
Required
false
Description
Additional tag attributes. They will be added directly to the resulting HTML tag.
data
DataType
mixed
Required
false
Description
Additional data-* attributes. They will each be added with a "data-" prefix.
aria
DataType
mixed
Required
false
Description
Additional aria-* attributes. They will each be added with a "aria-" prefix.
class
DataType
string
Required
false
Description
CSS class(es) for this element
dir
DataType
string
Required
false
Description
Text direction for this HTML element. Allowed strings: "ltr" (left to right), "rtl" (right to left)
id
DataType
string
Required
false
Description
Unique (in this file) identifier for this HTML element.
lang
DataType
string
Required
false
Description
Language for this element. Use short names specified in RFC 1766
style
DataType
string
Required
false
Description
Individual CSS styles for this element
title
DataType
string
Required
false
Description
Tooltip text of element
accesskey
DataType
string
Required
false
Description
Keyboard shortcut to access this element
tabindex
DataType
integer
Required
false
Description
Specifies the tab order of this element
onclick
DataType
string
Required
false
Description
JavaScript evaluated for the onclick event
tagName
DataType
string
Default
'ul'
Required
false
Description
Tag name to use for enclosing container, list and flags (not finished) only
tagNameChildren
DataType
string
Default
'li'
Required
false
Description
Tag name to use for child nodes surrounding links, list and flags only
defaultIsoFlag
DataType
string
Required
false
Description
ISO code of the default flag
defaultLanguageLabel
DataType
string
Required
false
Description
Label for the default language
order
DataType
mixed
Required
false
Description
Orders the languageIds after this list
labelOverwrite
DataType
mixed
Required
false
Description
Overrides language labels
hideNotTranslated
DataType
boolean
Required
false
Description
Hides languageIDs which are not translated
layout
DataType
string
Default
'flag,name'
Required
false
Description
How to render links when using autorendering. Possible selections: name,flag - use fx "name" or "flag,name" or "name,flag"
useCHash
DataType
boolean
Default
true
Required
false
Description
Use cHash for typolink. Has no effect on TYPO3 v9.5+
flagPath
DataType
string
Required
false
Description
Overwrites the path to the flag folder
flagImageType
DataType
string
Default
'svg'
Required
false
Description
Sets type of flag image: png, gif, jpeg
linkCurrent
DataType
boolean
Default
true
Required
false
Description
Sets flag to link current language or not
classCurrent
DataType
string
Default
'current'
Required
false
Description
Sets the class, by which the current language will be marked
as
DataType
string
Default
'languageMenu'
Required
false
Description
If used, stores the menu pages as an array in a variable named according to this value and renders the tag content - which means automatic rendering is disabled if this attribute is used
pageUid
DataType
integer
Required
false
Description
Optional page uid to use.
configuration
DataType
mixed
Default
array ()
Required
false
Description
Additional typoLink configuration
excludeQueryVars
DataType
string
Required
false
Description
Comma-separate list of variables to exclude
languages
DataType
mixed
Required
false
Description
Array, CSV or Traversable containing UIDs of languages to render
page.language ViewHelper <vhs:page.language>
Returns the current language from languages depending on l18n settings.
Arguments
languages
DataType
mixed
Required
false
Description
The languages (either CSV, array or implementing Traversable)
pageUid
DataType
integer
Required
false
Description
The page uid to check
normalWhenNoLanguage
DataType
boolean
Required
false
Description
If TRUE, a missing page overlay should be ignored
page.link ViewHelper <vhs:page.link>
Page: Link ViewHelper
Viewhelper for rendering page links
This viewhelper behaves identically to Fluid's link viewhelper
except for it fetches the title of the provided page UID and inserts
it as linktext if that is omitted. The link will not render at all
if the requested page is not translated in the current language.
Additional tag attributes. They will be added directly to the resulting HTML tag.
data
DataType
mixed
Required
false
Description
Additional data-* attributes. They will each be added with a "data-" prefix.
aria
DataType
mixed
Required
false
Description
Additional aria-* attributes. They will each be added with a "aria-" prefix.
class
DataType
string
Required
false
Description
CSS class(es) for this element
dir
DataType
string
Required
false
Description
Text direction for this HTML element. Allowed strings: "ltr" (left to right), "rtl" (right to left)
id
DataType
string
Required
false
Description
Unique (in this file) identifier for this HTML element.
lang
DataType
string
Required
false
Description
Language for this element. Use short names specified in RFC 1766
style
DataType
string
Required
false
Description
Individual CSS styles for this element
title
DataType
string
Required
false
Description
Tooltip text of element
accesskey
DataType
string
Required
false
Description
Keyboard shortcut to access this element
tabindex
DataType
integer
Required
false
Description
Specifies the tab order of this element
onclick
DataType
string
Required
false
Description
JavaScript evaluated for the onclick event
showAccessProtected
DataType
boolean
Required
false
Description
If TRUE links to access protected pages are always rendered regardless of user login status
classAccessProtected
DataType
string
Default
'protected'
Required
false
Description
Optional class name to add to links which are access protected
classAccessGranted
DataType
string
Default
'access-granted'
Required
false
Description
Optional class name to add to links which are access protected but access is actually granted
useShortcutUid
DataType
boolean
Required
false
Description
If TRUE, substitutes the link UID of a shortcut with the target page UID (and thus avoiding redirects) but does not change other data - which is done by using useShortcutData.
useShortcutTarget
DataType
boolean
Required
false
Description
Optional param for using shortcut target instead of shortcut itself for current link
useShortcutData
DataType
boolean
Required
false
Description
Shortcut to set useShortcutTarget and useShortcutData simultaneously
target
DataType
string
Required
false
Description
Target of link
rel
DataType
string
Required
false
Description
Specifies the relationship between the current document and the linked document
pageUid
DataType
integer
Required
false
Description
UID of the page to create the link and fetch the title for.
additionalParams
DataType
mixed
Default
array ()
Required
false
Description
Query parameters to be attached to the resulting URI
pageType
DataType
integer
Required
false
Description
Type of the target page. See typolink.parameter
noCache
DataType
boolean
Required
false
Description
When TRUE disables caching for the target page. You should not need this.
noCacheHash
DataType
boolean
Required
false
Description
When TRUE supresses the cHash query parameter created by TypoLink. You should not need this. Has no effect on TYPO3v11 and above.
section
DataType
string
Required
false
Description
The anchor to be added to the URI
absolute
DataType
boolean
Required
false
Description
When TRUE, the URI of the rendered link is absolute
addQueryString
DataType
boolean
Required
false
Description
When TRUE, the current query parameters will be kept in the URI
argumentsToBeExcludedFromQueryString
DataType
mixed
Default
array ()
Required
false
Description
Arguments to be removed from the URI. Only active if $addQueryString = TRUE
titleFields
DataType
string
Default
'nav_title,title'
Required
false
Description
CSV list of fields to use as link label - default is "nav_title,title", change to for example "tx_myext_somefield,subtitle,nav_title,title". The first field that contains text will be used. Field value resolved AFTER page field overlays.
pageTitleAs
DataType
string
Required
false
Description
When rendering child content, supplies page title as variable.
page.resources ViewHelper <vhs:page.resources>
Page FAL resources ViewHelper.
Arguments
table
DataType
string
Default
'pages'
Required
false
Description
The table to lookup records.
field
DataType
string
Default
'media'
Required
false
Description
The field of the table associated to resources.
record
DataType
mixed
Required
false
Description
The actual record. Alternatively you can use the "uid" argument.
uid
DataType
integer
Required
false
Description
The uid of the record. Alternatively you can use the "record" argument.
as
DataType
string
Required
false
Description
If specified, a template variable with this name containing the requested data will be inserted instead of returning it.
page.rootline ViewHelper <vhs:page.rootline>
ViewHelper to get the rootline of a page.
Arguments
as
DataType
string
Required
false
Description
Template variable name to assign; if not specified the ViewHelper returns the variable instead.
Use this ViewHelper to read the contents of the plugin.tx_vhs.settings.prependPath
TypoScript location - this setting stores the static prefix which gets added to all
relative resource URIs generated by VHS; whenever you require a ViewHelper which
does not respect this setting you can use this ViewHelper to prepend that setting
after the value is returned from the other ViewHelper.
ViewHelper used to render a link tag in the <head> section of the page.
If you use the ViewHelper in a plugin, the plugin and its action have to
be cached!
Arguments
additionalAttributes
DataType
mixed
Required
false
Description
Additional tag attributes. They will be added directly to the resulting HTML tag.
data
DataType
mixed
Required
false
Description
Additional data-* attributes. They will each be added with a "data-" prefix.
aria
DataType
mixed
Required
false
Description
Additional aria-* attributes. They will each be added with a "aria-" prefix.
This ViewHelper uses the TYPO3 PageRenderer to set the
page title - with everything this implies regarding
support for TypoScript settings.
Specifically you should note the setting config.noPageTitle
which must be set to either 1 (one) in case no other source
defines the page title (it's likely that at least one does),
or 2 (two) to indicate that the TS-controlled page title
must be disabled. A value of 2 (two) ensures that the title
used in this ViewHelper will be used in the rendered page.
If you use the ViewHelper in a plugin it has to be USER
not USER_INT, what means it has to be cached!
Why can I not forcibly override the title?
This has been opted out with full intention. The reasoning
behind not allowing a Fluid template to forcibly override the
page title that may be set through TypoScript is that many
other extensions (mainly SEO-focused ones) will be setting
and manipulating the page title - and if overridden in a
template file using a ViewHelper, it would be almost impossible
to detect unless you already know exactly where to look.
Enforcing use of the core behavior is the only way to ensure
that this ViewHelper can coexist with other extensions in
a fully controllable way.
Arguments
title
DataType
string
Required
false
Description
Title tag content
whitespaceString
DataType
string
Default
' '
Required
false
Description
String used to replace groups of white space characters, one replacement inserted per group
ViewHelper for rendering TYPO3 browse menus in Fluid
Renders links to browse inside a menu branch including
first, previous, next, last and up to the parent page.
Supports both automatic, tag-based rendering (which
defaults to ul > li with options to set both the
parent and child tag names. When using manual rendering
a range of support CSS classes are available along
with each page record.
DEPRECATED: use v:menu.browse instead
Arguments
additionalAttributes
DataType
mixed
Required
false
Description
Additional tag attributes. They will be added directly to the resulting HTML tag.
data
DataType
mixed
Required
false
Description
Additional data-* attributes. They will each be added with a "data-" prefix.
aria
DataType
mixed
Required
false
Description
Additional aria-* attributes. They will each be added with a "aria-" prefix.
class
DataType
string
Required
false
Description
CSS class(es) for this element
dir
DataType
string
Required
false
Description
Text direction for this HTML element. Allowed strings: "ltr" (left to right), "rtl" (right to left)
id
DataType
string
Required
false
Description
Unique (in this file) identifier for this HTML element.
lang
DataType
string
Required
false
Description
Language for this element. Use short names specified in RFC 1766
style
DataType
string
Required
false
Description
Individual CSS styles for this element
title
DataType
string
Required
false
Description
Tooltip text of element
accesskey
DataType
string
Required
false
Description
Keyboard shortcut to access this element
tabindex
DataType
integer
Required
false
Description
Specifies the tab order of this element
onclick
DataType
string
Required
false
Description
JavaScript evaluated for the onclick event
forceClosingTag
DataType
boolean
Required
false
Description
If TRUE, forces the created tag to use a closing tag. If FALSE, allows self-closing tags.
hideIfEmpty
DataType
boolean
Required
false
Description
Hide the tag completely if there is no tag content
contenteditable
DataType
string
Required
false
Description
Specifies whether the contents of the element are editable.
contextmenu
DataType
string
Required
false
Description
The value of the id attribute on the menu with which to associate the element as a context menu.
draggable
DataType
string
Required
false
Description
Specifies whether the element is draggable.
dropzone
DataType
string
Required
false
Description
Specifies what types of content can be dropped on the element, and instructs the UA about which actions to take with content when it is dropped on the element.
translate
DataType
string
Required
false
Description
Specifies whether an elements attribute values and contents of its children are to be translated when the page is localized, or whether to leave them unchanged.
spellcheck
DataType
string
Required
false
Description
Specifies whether the element represents an element whose contents are subject to spell checking and grammar checking.
hidden
DataType
string
Required
false
Description
Specifies that the element represents an element that is not yet, or is no longer, relevant.
showAccessProtected
DataType
boolean
Required
false
Description
If TRUE links to access protected pages are always rendered regardless of user login status
classAccessProtected
DataType
string
Default
'protected'
Required
false
Description
Optional class name to add to links which are access protected
classAccessGranted
DataType
string
Default
'access-granted'
Required
false
Description
Optional class name to add to links which are access protected but access is actually granted
useShortcutUid
DataType
boolean
Required
false
Description
If TRUE, substitutes the link UID of a shortcut with the target page UID (and thus avoiding redirects) but does not change other data - which is done by using useShortcutData.
useShortcutTarget
DataType
boolean
Required
false
Description
Optional param for using shortcut target instead of shortcut itself for current link
useShortcutData
DataType
boolean
Required
false
Description
Shortcut to set useShortcutTarget and useShortcutData simultaneously
tagName
DataType
string
Default
'ul'
Required
false
Description
Tag name to use for enclosing container
tagNameChildren
DataType
string
Default
'li'
Required
false
Description
Tag name to use for child nodes surrounding links. If set to "a" enables non-wrapping mode.
entryLevel
DataType
integer
Required
false
Description
Optional entryLevel TS equivalent of the menu
levels
DataType
integer
Default
1
Required
false
Description
Number of levels to render - setting this to a number higher than 1 (one) will expand menu items that are active, to a depth of $levels starting from $entryLevel
expandAll
DataType
boolean
Required
false
Description
If TRUE and $levels > 1 then expands all (not just the active) menu items which have submenus
classFirst
DataType
string
Required
false
Description
Optional class name for the first menu elment
classLast
DataType
string
Required
false
Description
Optional class name for the last menu elment
classActive
DataType
string
Default
'active'
Required
false
Description
Optional class name to add to active links
classCurrent
DataType
string
Default
'current'
Required
false
Description
Optional class name to add to current link
classHasSubpages
DataType
string
Default
'sub'
Required
false
Description
Optional class name to add to links which have subpages
substElementUid
DataType
boolean
Required
false
Description
Optional parameter for wrapping the link with the uid of the page
showHiddenInMenu
DataType
boolean
Required
false
Description
Include pages that are set to be hidden in menus
showCurrent
DataType
boolean
Default
true
Required
false
Description
If FALSE, does not display the current page
linkCurrent
DataType
boolean
Default
true
Required
false
Description
If FALSE, does not wrap the current page in a link
linkActive
DataType
boolean
Default
true
Required
false
Description
If FALSE, does not wrap with links the titles of pages that are active in the rootline
titleFields
DataType
string
Default
'nav_title,title'
Required
false
Description
CSV list of fields to use as link label - default is "nav_title,title", change to for example "tx_myext_somefield,subtitle,nav_title,title". The first field that contains text will be used. Field value resolved AFTER page field overlays.
includeAnchorTitle
DataType
boolean
Default
true
Required
false
Description
If TRUE, includes the page title as title attribute on the anchor.
includeSpacers
DataType
boolean
Required
false
Description
Wether or not to include menu spacers in the page select query
deferred
DataType
boolean
Required
false
Description
If TRUE, does not output the tag content UNLESS a v:page.menu.deferred child ViewHelper is both used and triggered. This allows you to create advanced conditions while still using automatic rendering
as
DataType
string
Default
'menu'
Required
false
Description
If used, stores the menu pages as an array in a variable named after this value and renders the tag content. If the tag content is empty automatic rendering is triggered.
rootLineAs
DataType
string
Default
'rootLine'
Required
false
Description
If used, stores the menu root line as an array in a variable named according to this value and renders the tag content - which means automatic rendering is disabled if this attribute is used
excludePages
DataType
mixed
Required
false
Description
Page UIDs to exclude from the menu. Can be CSV, array or an object implementing Traversable.
forceAbsoluteUrl
DataType
boolean
Required
false
Description
If TRUE, the menu will be rendered with absolute URLs
doktypes
DataType
mixed
Required
false
Description
DEPRECATED: Please use typical doktypes for starting points like shortcuts.
divider
DataType
string
Required
false
Description
Optional divider to insert between each menu item. Note that this does not mix well with automatic rendering due to the use of an ul > li structure
labelFirst
DataType
string
Default
'first'
Required
false
Description
Label for the "first" link
labelLast
DataType
string
Default
'last'
Required
false
Description
Label for the "last" link
labelPrevious
DataType
string
Default
'previous'
Required
false
Description
Label for the "previous" link
labelNext
DataType
string
Default
'next'
Required
false
Description
Label for the "next" link
labelUp
DataType
string
Default
'up'
Required
false
Description
Label for the "up" link
renderFirst
DataType
boolean
Default
true
Required
false
Description
If set to FALSE the "first" link will not be rendered
renderLast
DataType
boolean
Default
true
Required
false
Description
If set to FALSE the "last" link will not be rendered
renderUp
DataType
boolean
Default
true
Required
false
Description
If set to FALSE the "up" link will not be rendered
usePageTitles
DataType
boolean
Required
false
Description
If set to TRUE, uses target page titles instead of "next", "previous" etc. labels
pageUid
DataType
integer
Required
false
Description
Optional parent page UID to use as top level of menu. If unspecified, current page UID is used
currentPageUid
DataType
integer
Required
false
Description
Optional page UID to use as current page. If unspecified, current page UID from globals is used
page.menu.deferred
Page: Deferred menu rendering ViewHelper
Place this ViewHelper inside any other ViewHelper which
has been configured with the deferred attribute set to
TRUE - this will cause the output of the parent to only
contain the content of this ViewHelper.
DEPRECATED: use v:menu.deferred instead
Arguments
additionalAttributes
DataType
mixed
Required
false
Description
Additional tag attributes. They will be added directly to the resulting HTML tag.
data
DataType
mixed
Required
false
Description
Additional data-* attributes. They will each be added with a "data-" prefix.
aria
DataType
mixed
Required
false
Description
Additional aria-* attributes. They will each be added with a "aria-" prefix.
class
DataType
string
Required
false
Description
CSS class(es) for this element
dir
DataType
string
Required
false
Description
Text direction for this HTML element. Allowed strings: "ltr" (left to right), "rtl" (right to left)
id
DataType
string
Required
false
Description
Unique (in this file) identifier for this HTML element.
lang
DataType
string
Required
false
Description
Language for this element. Use short names specified in RFC 1766
style
DataType
string
Required
false
Description
Individual CSS styles for this element
title
DataType
string
Required
false
Description
Tooltip text of element
accesskey
DataType
string
Required
false
Description
Keyboard shortcut to access this element
tabindex
DataType
integer
Required
false
Description
Specifies the tab order of this element
onclick
DataType
string
Required
false
Description
JavaScript evaluated for the onclick event
forceClosingTag
DataType
boolean
Required
false
Description
If TRUE, forces the created tag to use a closing tag. If FALSE, allows self-closing tags.
hideIfEmpty
DataType
boolean
Required
false
Description
Hide the tag completely if there is no tag content
contenteditable
DataType
string
Required
false
Description
Specifies whether the contents of the element are editable.
contextmenu
DataType
string
Required
false
Description
The value of the id attribute on the menu with which to associate the element as a context menu.
draggable
DataType
string
Required
false
Description
Specifies whether the element is draggable.
dropzone
DataType
string
Required
false
Description
Specifies what types of content can be dropped on the element, and instructs the UA about which actions to take with content when it is dropped on the element.
translate
DataType
string
Required
false
Description
Specifies whether an elements attribute values and contents of its children are to be translated when the page is localized, or whether to leave them unchanged.
spellcheck
DataType
string
Required
false
Description
Specifies whether the element represents an element whose contents are subject to spell checking and grammar checking.
hidden
DataType
string
Required
false
Description
Specifies that the element represents an element that is not yet, or is no longer, relevant.
showAccessProtected
DataType
boolean
Required
false
Description
If TRUE links to access protected pages are always rendered regardless of user login status
classAccessProtected
DataType
string
Default
'protected'
Required
false
Description
Optional class name to add to links which are access protected
classAccessGranted
DataType
string
Default
'access-granted'
Required
false
Description
Optional class name to add to links which are access protected but access is actually granted
useShortcutUid
DataType
boolean
Required
false
Description
If TRUE, substitutes the link UID of a shortcut with the target page UID (and thus avoiding redirects) but does not change other data - which is done by using useShortcutData.
useShortcutTarget
DataType
boolean
Required
false
Description
Optional param for using shortcut target instead of shortcut itself for current link
useShortcutData
DataType
boolean
Required
false
Description
Shortcut to set useShortcutTarget and useShortcutData simultaneously
tagName
DataType
string
Default
'ul'
Required
false
Description
Tag name to use for enclosing container
tagNameChildren
DataType
string
Default
'li'
Required
false
Description
Tag name to use for child nodes surrounding links. If set to "a" enables non-wrapping mode.
entryLevel
DataType
integer
Required
false
Description
Optional entryLevel TS equivalent of the menu
levels
DataType
integer
Default
1
Required
false
Description
Number of levels to render - setting this to a number higher than 1 (one) will expand menu items that are active, to a depth of $levels starting from $entryLevel
expandAll
DataType
boolean
Required
false
Description
If TRUE and $levels > 1 then expands all (not just the active) menu items which have submenus
classFirst
DataType
string
Required
false
Description
Optional class name for the first menu elment
classLast
DataType
string
Required
false
Description
Optional class name for the last menu elment
classActive
DataType
string
Default
'active'
Required
false
Description
Optional class name to add to active links
classCurrent
DataType
string
Default
'current'
Required
false
Description
Optional class name to add to current link
classHasSubpages
DataType
string
Default
'sub'
Required
false
Description
Optional class name to add to links which have subpages
substElementUid
DataType
boolean
Required
false
Description
Optional parameter for wrapping the link with the uid of the page
showHiddenInMenu
DataType
boolean
Required
false
Description
Include pages that are set to be hidden in menus
showCurrent
DataType
boolean
Default
true
Required
false
Description
If FALSE, does not display the current page
linkCurrent
DataType
boolean
Default
true
Required
false
Description
If FALSE, does not wrap the current page in a link
linkActive
DataType
boolean
Default
true
Required
false
Description
If FALSE, does not wrap with links the titles of pages that are active in the rootline
titleFields
DataType
string
Default
'nav_title,title'
Required
false
Description
CSV list of fields to use as link label - default is "nav_title,title", change to for example "tx_myext_somefield,subtitle,nav_title,title". The first field that contains text will be used. Field value resolved AFTER page field overlays.
includeAnchorTitle
DataType
boolean
Default
true
Required
false
Description
If TRUE, includes the page title as title attribute on the anchor.
includeSpacers
DataType
boolean
Required
false
Description
Wether or not to include menu spacers in the page select query
deferred
DataType
boolean
Required
false
Description
If TRUE, does not output the tag content UNLESS a v:page.menu.deferred child ViewHelper is both used and triggered. This allows you to create advanced conditions while still using automatic rendering
as
DataType
string
Required
false
Description
If used, stores the menu pages as an array in a variable named according to this value and renders the tag content - which means automatic rendering is disabled if this attribute is used
rootLineAs
DataType
string
Default
'rootLine'
Required
false
Description
If used, stores the menu root line as an array in a variable named according to this value and renders the tag content - which means automatic rendering is disabled if this attribute is used
excludePages
DataType
mixed
Required
false
Description
Page UIDs to exclude from the menu. Can be CSV, array or an object implementing Traversable.
forceAbsoluteUrl
DataType
boolean
Required
false
Description
If TRUE, the menu will be rendered with absolute URLs
doktypes
DataType
mixed
Required
false
Description
DEPRECATED: Please use typical doktypes for starting points like shortcuts.
divider
DataType
string
Required
false
Description
Optional divider to insert between each menu item. Note that this does not mix well with automatic rendering due to the use of an ul > li structure
page.menu.directory
Page: Directory Menu ViewHelper
ViewHelper for rendering TYPO3 list menus in Fluid
Supports both automatic, tag-based rendering (which
defaults to ul > li with options to set both the
parent and child tag names. When using manual rendering
a range of support CSS classes are available along
with each page record.
DEPRECATED: use v:menu.directory instead
Arguments
additionalAttributes
DataType
mixed
Required
false
Description
Additional tag attributes. They will be added directly to the resulting HTML tag.
data
DataType
mixed
Required
false
Description
Additional data-* attributes. They will each be added with a "data-" prefix.
aria
DataType
mixed
Required
false
Description
Additional aria-* attributes. They will each be added with a "aria-" prefix.
class
DataType
string
Required
false
Description
CSS class(es) for this element
dir
DataType
string
Required
false
Description
Text direction for this HTML element. Allowed strings: "ltr" (left to right), "rtl" (right to left)
id
DataType
string
Required
false
Description
Unique (in this file) identifier for this HTML element.
lang
DataType
string
Required
false
Description
Language for this element. Use short names specified in RFC 1766
style
DataType
string
Required
false
Description
Individual CSS styles for this element
title
DataType
string
Required
false
Description
Tooltip text of element
accesskey
DataType
string
Required
false
Description
Keyboard shortcut to access this element
tabindex
DataType
integer
Required
false
Description
Specifies the tab order of this element
onclick
DataType
string
Required
false
Description
JavaScript evaluated for the onclick event
forceClosingTag
DataType
boolean
Required
false
Description
If TRUE, forces the created tag to use a closing tag. If FALSE, allows self-closing tags.
hideIfEmpty
DataType
boolean
Required
false
Description
Hide the tag completely if there is no tag content
contenteditable
DataType
string
Required
false
Description
Specifies whether the contents of the element are editable.
contextmenu
DataType
string
Required
false
Description
The value of the id attribute on the menu with which to associate the element as a context menu.
draggable
DataType
string
Required
false
Description
Specifies whether the element is draggable.
dropzone
DataType
string
Required
false
Description
Specifies what types of content can be dropped on the element, and instructs the UA about which actions to take with content when it is dropped on the element.
translate
DataType
string
Required
false
Description
Specifies whether an elements attribute values and contents of its children are to be translated when the page is localized, or whether to leave them unchanged.
spellcheck
DataType
string
Required
false
Description
Specifies whether the element represents an element whose contents are subject to spell checking and grammar checking.
hidden
DataType
string
Required
false
Description
Specifies that the element represents an element that is not yet, or is no longer, relevant.
showAccessProtected
DataType
boolean
Required
false
Description
If TRUE links to access protected pages are always rendered regardless of user login status
classAccessProtected
DataType
string
Default
'protected'
Required
false
Description
Optional class name to add to links which are access protected
classAccessGranted
DataType
string
Default
'access-granted'
Required
false
Description
Optional class name to add to links which are access protected but access is actually granted
useShortcutUid
DataType
boolean
Required
false
Description
If TRUE, substitutes the link UID of a shortcut with the target page UID (and thus avoiding redirects) but does not change other data - which is done by using useShortcutData.
useShortcutTarget
DataType
boolean
Required
false
Description
Optional param for using shortcut target instead of shortcut itself for current link
useShortcutData
DataType
boolean
Required
false
Description
Shortcut to set useShortcutTarget and useShortcutData simultaneously
tagName
DataType
string
Default
'ul'
Required
false
Description
Tag name to use for enclosing container
tagNameChildren
DataType
string
Default
'li'
Required
false
Description
Tag name to use for child nodes surrounding links. If set to "a" enables non-wrapping mode.
entryLevel
DataType
integer
Required
false
Description
Optional entryLevel TS equivalent of the menu
levels
DataType
integer
Default
1
Required
false
Description
Number of levels to render - setting this to a number higher than 1 (one) will expand menu items that are active, to a depth of $levels starting from $entryLevel
expandAll
DataType
boolean
Required
false
Description
If TRUE and $levels > 1 then expands all (not just the active) menu items which have submenus
classFirst
DataType
string
Required
false
Description
Optional class name for the first menu elment
classLast
DataType
string
Required
false
Description
Optional class name for the last menu elment
classActive
DataType
string
Default
'active'
Required
false
Description
Optional class name to add to active links
classCurrent
DataType
string
Default
'current'
Required
false
Description
Optional class name to add to current link
classHasSubpages
DataType
string
Default
'sub'
Required
false
Description
Optional class name to add to links which have subpages
substElementUid
DataType
boolean
Required
false
Description
Optional parameter for wrapping the link with the uid of the page
showHiddenInMenu
DataType
boolean
Required
false
Description
Include pages that are set to be hidden in menus
showCurrent
DataType
boolean
Default
true
Required
false
Description
If FALSE, does not display the current page
linkCurrent
DataType
boolean
Default
true
Required
false
Description
If FALSE, does not wrap the current page in a link
linkActive
DataType
boolean
Default
true
Required
false
Description
If FALSE, does not wrap with links the titles of pages that are active in the rootline
titleFields
DataType
string
Default
'nav_title,title'
Required
false
Description
CSV list of fields to use as link label - default is "nav_title,title", change to for example "tx_myext_somefield,subtitle,nav_title,title". The first field that contains text will be used. Field value resolved AFTER page field overlays.
includeAnchorTitle
DataType
boolean
Default
true
Required
false
Description
If TRUE, includes the page title as title attribute on the anchor.
includeSpacers
DataType
boolean
Required
false
Description
Wether or not to include menu spacers in the page select query
deferred
DataType
boolean
Required
false
Description
If TRUE, does not output the tag content UNLESS a v:page.menu.deferred child ViewHelper is both used and triggered. This allows you to create advanced conditions while still using automatic rendering
as
DataType
string
Default
'menu'
Required
false
Description
If used, stores the menu pages as an array in a variable named after this value and renders the tag content. If the tag content is empty automatic rendering is triggered.
rootLineAs
DataType
string
Default
'rootLine'
Required
false
Description
If used, stores the menu root line as an array in a variable named according to this value and renders the tag content - which means automatic rendering is disabled if this attribute is used
excludePages
DataType
mixed
Required
false
Description
Page UIDs to exclude from the menu. Can be CSV, array or an object implementing Traversable.
forceAbsoluteUrl
DataType
boolean
Required
false
Description
If TRUE, the menu will be rendered with absolute URLs
doktypes
DataType
mixed
Required
false
Description
DEPRECATED: Please use typical doktypes for starting points like shortcuts.
divider
DataType
string
Required
false
Description
Optional divider to insert between each menu item. Note that this does not mix well with automatic rendering due to the use of an ul > li structure
pages
DataType
mixed
Required
false
Description
Parent page UIDs of subpages to include in the menu. Can be CSV, array or an object implementing Traversable.
page.menu.list
Page: List Menu ViewHelper
ViewHelper for rendering TYPO3 list menus in Fluid
Supports both automatic, tag-based rendering (which
defaults to ul > li with options to set both the
parent and child tag names. When using manual rendering
a range of support CSS classes are available along
with each page record.
DEPRECATED: use v:menu.list instead
Arguments
additionalAttributes
DataType
mixed
Required
false
Description
Additional tag attributes. They will be added directly to the resulting HTML tag.
data
DataType
mixed
Required
false
Description
Additional data-* attributes. They will each be added with a "data-" prefix.
aria
DataType
mixed
Required
false
Description
Additional aria-* attributes. They will each be added with a "aria-" prefix.
class
DataType
string
Required
false
Description
CSS class(es) for this element
dir
DataType
string
Required
false
Description
Text direction for this HTML element. Allowed strings: "ltr" (left to right), "rtl" (right to left)
id
DataType
string
Required
false
Description
Unique (in this file) identifier for this HTML element.
lang
DataType
string
Required
false
Description
Language for this element. Use short names specified in RFC 1766
style
DataType
string
Required
false
Description
Individual CSS styles for this element
title
DataType
string
Required
false
Description
Tooltip text of element
accesskey
DataType
string
Required
false
Description
Keyboard shortcut to access this element
tabindex
DataType
integer
Required
false
Description
Specifies the tab order of this element
onclick
DataType
string
Required
false
Description
JavaScript evaluated for the onclick event
forceClosingTag
DataType
boolean
Required
false
Description
If TRUE, forces the created tag to use a closing tag. If FALSE, allows self-closing tags.
hideIfEmpty
DataType
boolean
Required
false
Description
Hide the tag completely if there is no tag content
contenteditable
DataType
string
Required
false
Description
Specifies whether the contents of the element are editable.
contextmenu
DataType
string
Required
false
Description
The value of the id attribute on the menu with which to associate the element as a context menu.
draggable
DataType
string
Required
false
Description
Specifies whether the element is draggable.
dropzone
DataType
string
Required
false
Description
Specifies what types of content can be dropped on the element, and instructs the UA about which actions to take with content when it is dropped on the element.
translate
DataType
string
Required
false
Description
Specifies whether an elements attribute values and contents of its children are to be translated when the page is localized, or whether to leave them unchanged.
spellcheck
DataType
string
Required
false
Description
Specifies whether the element represents an element whose contents are subject to spell checking and grammar checking.
hidden
DataType
string
Required
false
Description
Specifies that the element represents an element that is not yet, or is no longer, relevant.
showAccessProtected
DataType
boolean
Required
false
Description
If TRUE links to access protected pages are always rendered regardless of user login status
classAccessProtected
DataType
string
Default
'protected'
Required
false
Description
Optional class name to add to links which are access protected
classAccessGranted
DataType
string
Default
'access-granted'
Required
false
Description
Optional class name to add to links which are access protected but access is actually granted
useShortcutUid
DataType
boolean
Required
false
Description
If TRUE, substitutes the link UID of a shortcut with the target page UID (and thus avoiding redirects) but does not change other data - which is done by using useShortcutData.
useShortcutTarget
DataType
boolean
Required
false
Description
Optional param for using shortcut target instead of shortcut itself for current link
useShortcutData
DataType
boolean
Required
false
Description
Shortcut to set useShortcutTarget and useShortcutData simultaneously
tagName
DataType
string
Default
'ul'
Required
false
Description
Tag name to use for enclosing container
tagNameChildren
DataType
string
Default
'li'
Required
false
Description
Tag name to use for child nodes surrounding links. If set to "a" enables non-wrapping mode.
entryLevel
DataType
integer
Required
false
Description
Optional entryLevel TS equivalent of the menu
levels
DataType
integer
Default
1
Required
false
Description
Number of levels to render - setting this to a number higher than 1 (one) will expand menu items that are active, to a depth of $levels starting from $entryLevel
expandAll
DataType
boolean
Required
false
Description
If TRUE and $levels > 1 then expands all (not just the active) menu items which have submenus
classFirst
DataType
string
Required
false
Description
Optional class name for the first menu elment
classLast
DataType
string
Required
false
Description
Optional class name for the last menu elment
classActive
DataType
string
Default
'active'
Required
false
Description
Optional class name to add to active links
classCurrent
DataType
string
Default
'current'
Required
false
Description
Optional class name to add to current link
classHasSubpages
DataType
string
Default
'sub'
Required
false
Description
Optional class name to add to links which have subpages
substElementUid
DataType
boolean
Required
false
Description
Optional parameter for wrapping the link with the uid of the page
showHiddenInMenu
DataType
boolean
Required
false
Description
Include pages that are set to be hidden in menus
showCurrent
DataType
boolean
Default
true
Required
false
Description
If FALSE, does not display the current page
linkCurrent
DataType
boolean
Default
true
Required
false
Description
If FALSE, does not wrap the current page in a link
linkActive
DataType
boolean
Default
true
Required
false
Description
If FALSE, does not wrap with links the titles of pages that are active in the rootline
titleFields
DataType
string
Default
'nav_title,title'
Required
false
Description
CSV list of fields to use as link label - default is "nav_title,title", change to for example "tx_myext_somefield,subtitle,nav_title,title". The first field that contains text will be used. Field value resolved AFTER page field overlays.
includeAnchorTitle
DataType
boolean
Default
true
Required
false
Description
If TRUE, includes the page title as title attribute on the anchor.
includeSpacers
DataType
boolean
Required
false
Description
Wether or not to include menu spacers in the page select query
deferred
DataType
boolean
Required
false
Description
If TRUE, does not output the tag content UNLESS a v:page.menu.deferred child ViewHelper is both used and triggered. This allows you to create advanced conditions while still using automatic rendering
as
DataType
string
Default
'menu'
Required
false
Description
If used, stores the menu pages as an array in a variable named after this value and renders the tag content. If the tag content is empty automatic rendering is triggered.
rootLineAs
DataType
string
Default
'rootLine'
Required
false
Description
If used, stores the menu root line as an array in a variable named according to this value and renders the tag content - which means automatic rendering is disabled if this attribute is used
excludePages
DataType
mixed
Required
false
Description
Page UIDs to exclude from the menu. Can be CSV, array or an object implementing Traversable.
forceAbsoluteUrl
DataType
boolean
Required
false
Description
If TRUE, the menu will be rendered with absolute URLs
doktypes
DataType
mixed
Required
false
Description
DEPRECATED: Please use typical doktypes for starting points like shortcuts.
divider
DataType
string
Required
false
Description
Optional divider to insert between each menu item. Note that this does not mix well with automatic rendering due to the use of an ul > li structure
pages
DataType
mixed
Required
false
Description
Page UIDs to include in the menu. Can be CSV, array or an object implementing Traversable.
page.menu.sub
Page: Auto Sub Menu ViewHelper
Recycles the parent menu ViewHelper instance, resetting the
page UID used as starting point and repeating rendering of
the exact same tag content.
Used in custom menu rendering to indicate where a submenu is
to be rendered; accepts only a single argument called pageUid
which defines the new starting page UID that is used in the
recycled parent menu instance.
DEPRECATED: use v:menu.sub instead
Arguments
pageUid
DataType
mixed
Required
false
Description
Page UID to be overridden in the recycled rendering of the parent instance, if one exists
Do not use the "uid" argument in the "Preview" section.
Instead, use the "record" argument and pass the entire record.
This bypasses visibility restrictions that normally apply when you attempt
to load a record by UID through TYPO3's PageRepository, which is what the
resource ViewHelpers do if you only pass uid.
Arguments
table
DataType
string
Default
'pages'
Required
false
Description
The table to lookup records.
field
DataType
string
Default
'media'
Required
false
Description
The field of the table associated to resources.
record
DataType
mixed
Required
false
Description
The actual record. Alternatively you can use the "uid" argument.
uid
DataType
integer
Required
false
Description
The uid of the record. Alternatively you can use the "record" argument.
as
DataType
string
Required
false
Description
If specified, a template variable with this name containing the requested data will be inserted instead of returning it.
asObjects
DataType
boolean
Required
false
Description
Can be set to TRUE to return objects instead of file information arrays.
limit
DataType
integer
Required
false
Description
Optional limit to the total number of records to render
slide
DataType
integer
Required
false
Description
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.
slideCollect
DataType
integer
Required
false
Description
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.
slideCollectReverse
DataType
boolean
Required
false
Description
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.
Generates a random number. The default minimum number is
set to 100000 in order to generate a longer integer string
representation. Decimal values can be generated as well.
Arguments
minimum
DataType
integer
Default
100000
Required
false
Description
Minimum number - defaults to 100000 (default max is 999999 for equal string lengths)
maximum
DataType
integer
Default
999999
Required
false
Description
Maximum number - defaults to 999999 (default min is 100000 for equal string lengths)
minimumDecimals
DataType
integer
Required
false
Description
Minimum number of also randomized decimal digits to add to number
maximumDecimals
DataType
integer
Required
false
Description
Maximum number of also randomized decimal digits to add to number
random.string ViewHelper <vhs:random.string>
Random: String Generator
Use either minimumLength / maximumLength or just length.
Specify the characters which can be randomized using characters.
Renders a single character identified by its charset number.
For example: <v:render.character ascii="10" /> renders a UNIX linebreak
as does {v:render.character(ascii: 10)}. Can be used in combination with
v:iterator.loop` to render sequences or repeat the same character:
And naturally you can feed any integer variable or ViewHelper return value
into the ascii parameter throught renderChildren to allow chaining:
{variableWithAsciiInteger -> v:render.ascii()}
Copied!
And arrays are also supported - they will produce a string of characters
from each number in the array:
{v:render.ascii(ascii: {0: 13, 1: 10})}
Copied!
Will produce a Windows line break, rn.
Arguments
ascii
DataType
mixed
Required
false
Description
ASCII character to render
render.cache ViewHelper <vhs:render.cache>
Cache Rendering ViewHelper
Caches the child content (any type supported as long as it
can be serialized). Because of the added overhead you should
only use this if what you are caching is complex enough that
it performs many DB request (for example when displaying an
object with many lazy properties which don't load until the
template asks for the property value). In short, applies to
just about the same use cases as any other cache - but remember
that Fluid is already a very efficient rendering engine so don't
just assume that using the ViewHelper will increase performance
or decrease memory usage.
Works forcibly, i.e. can only re-render its content if the
cache is cleared. A CTRL+Refresh in the browser does nothing,
even if a BE user is logged in. Only use this ViewHelper around
content which you are absolutely sure it makes sense to cache
along with an identity - for example, if rendering an uncached
plugin which contains a Partial template that is in all aspects
just a solid-state HTML representation of something like a list
of current news.
The cache behind this ViewHelper is the Extbase object cache,
which is cleared when you clear the page content cache.
Do not use on form elements, it will invalidate the checksum.
Do not use around ViewHelpers which add header data or which
interact with the PageRenderer or other "live" objects; this
includes many of the VHS ViewHelpers!
Arguments
content
DataType
string
Required
false
Description
Content to be cached
identity
DataType
string
Required
true
Description
Identity for cached entry
onError
DataType
string
Required
false
Description
Optional error message to display if error occur while rendering. If NULL, lets the error Exception pass trough (and break rendering)
graceful
DataType
boolean
Required
false
Description
If forced to FALSE, errors are not caught but rather "transmitted" as every other error would be
render.inline ViewHelper <vhs:render.inline>
Render: Inline
Render as string containing Fluid as if it were
part of the template currently being rendered.
Environment (template variables etc.) is cloned
but not re-merged after rendering, which means that
any and all changes in variables that happen while
rendering this inline code will be destroyed after
sub-rendering is finished.
Arguments
content
DataType
string
Required
false
Description
Template code to render as Fluid (usually from a variable)
Optional error message to display if error occur while rendering. If NULL, lets the error Exception pass trough (and break rendering)
graceful
DataType
boolean
Required
false
Description
If forced to FALSE, errors are not caught but rather "transmitted" as every other error would be
render.record ViewHelper <vhs:render.record>
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>.
Arguments
column
DataType
integer
Required
false
Description
Column position number (colPos) of the column to render
order
DataType
string
Default
'sorting'
Required
false
Description
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.
sortDirection
DataType
string
Default
'ASC'
Required
false
Description
Optional sort direction of content elements
pageUid
DataType
integer
Required
false
Description
If set, selects only content from this page UID. Ignored when "contentUids" is specified.
contentUids
DataType
mixed
Required
false
Description
If used, replaces all conditions with an "uid IN (1,2,3)" style condition using the UID values from this array
sectionIndexOnly
DataType
boolean
Required
false
Description
If TRUE, only renders/gets content that is marked as "include in section index"
loadRegister
DataType
mixed
Required
false
Description
List of LOAD_REGISTER variable
render
DataType
boolean
Default
true
Required
false
Description
Render result
hideUntranslated
DataType
boolean
Required
false
Description
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
limit
DataType
integer
Required
false
Description
Optional limit to the total number of records to render
slide
DataType
integer
Required
false
Description
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.
slideCollect
DataType
integer
Required
false
Description
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.
slideCollectReverse
DataType
boolean
Required
false
Description
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.
record
DataType
mixed
Required
false
Description
Record to render
render.request ViewHelper <vhs:render.request>
Render: Request
Renders a sub-request to the desired Extension, Plugin,
Controller and action with the desired arguments.
Note: arguments must not be wrapped with the prefix used
in GET/POST parameters but must be provided as if the
arguments were sent directly to the Controller action.
Arguments
onError
DataType
string
Required
false
Description
Optional error message to display if error occur while rendering. If NULL, lets the error Exception pass trough (and break rendering)
graceful
DataType
boolean
Required
false
Description
If forced to FALSE, errors are not caught but rather "transmitted" as every other error would be
action
DataType
string
Required
false
Description
Controller action to call in request
controller
DataType
string
Required
false
Description
Controller name to call in request
extensionName
DataType
string
Required
false
Description
Extension name scope to use in request
vendorName
DataType
string
Required
false
Description
Vendor name scope to use in request. WARNING: only applies to TYPO3 versions below 10.4
pluginName
DataType
string
Required
false
Description
Plugin name scope to use in request
arguments
DataType
mixed
Required
false
Description
Arguments to use in request
render.template ViewHelper <vhs:render.template>
Render: Template
Render a template file (with arguments if desired).
Supports passing variables and controlling the format,
paths can be overridden and uses the same format as TS
settings a' la plugin.tx_myext.view, which means that
this can be done (from any extension, not just "foo")
Which would render the "show" action's template from
EXT:foo using paths define in that extension's typoscript
but using a custom loaded object when rendering the template
rather than the object defined by the "Action" controller
of EXT:foo. The output would be in XML format and this
format would also be respected by Layouts and Partials
which are rendered from the Show.html template.
As such this is very similar to Render/RequestViewHelper
with two major differences:
A true ControllerContext is not present when rendering which
means that links generated in the template should be made
always including all parameters from ExtensionName over
PluginName through the usual action etc.
The Controller from EXT:foo is not involved in any way,
which means that any custom variables the particular
template depends on must be added manually through
the "variables" argument
Consider using Render/InlineViewHelper if you are rendering
templates from the same plugin.
Consider using Render/RequestViewHelper if you require a
completely isolated rendering identical to that which takes
place when rendering an Extbase plugin's content object.
Arguments
onError
DataType
string
Required
false
Description
Optional error message to display if error occur while rendering. If NULL, lets the error Exception pass trough (and break rendering)
graceful
DataType
boolean
Required
false
Description
If forced to FALSE, errors are not caught but rather "transmitted" as every other error would be
file
DataType
string
Required
false
Description
Path to template file, EXT:myext/... paths supported
variables
DataType
mixed
Required
false
Description
Optional array of template variables for rendering
format
DataType
string
Required
false
Description
Optional format of the template(s) being rendered
paths
DataType
mixed
Required
false
Description
Optional array of arrays of layout and partial root paths, EXT:mypath/... paths supported
render.uncache ViewHelper <vhs:render.uncache>
Uncaches partials. Use like f:render.
The partial will then be rendered each time.
Please be aware that this will impact render time.
Arguments must be serializable and will be cached.
Arguments
partial
DataType
string
Required
true
Description
Reference to a partial.
section
DataType
string
Required
false
Description
Name of section inside the partial to render.
arguments
DataType
mixed
Required
false
Description
Arguments to pass to the partial.
persistPartialPaths
DataType
boolean
Default
true
Required
false
Description
Normally, v:render.uncache will persist the partialRootPaths array that was active when the ViewHelperwas called, so the exact paths will be reused when rendering the uncached portion of the page output. This is done to ensure that even if you manually added some partial paths through some dynamic means (for example, based on a controller argument) then those paths would be used. However, in some cases this will be undesirable - namely when using a cache that is shared between multiple TYPO3 instances and each instance has a different path in the server's file system (e.g. load balanced setups). On such setups you should set persistPartialPaths="0" on this ViewHelper to prevent it from caching the resolved partialRootPaths. The ViewHelper will then instead use whichever partialRootPaths are configured for the extension that calls v:render.uncache. Note that when this is done, the special use case of dynamic or controller-overridden partialRootPaths is simply not supported.
Reads a certain language file with returning not just one single label,
but all the translated labels.
Examples
<!-- Tag usage for force getting labels in a specific language (different to current is possible too) -->
<v:resource.language extensionName="myext" path="Path/To/Locallang.xlf" languageKey="en"/>
Copied!
<!-- Tag usage for getting labels of current language -->
<v:resource.language extensionName="myext" path="Path/To/Locallang.xlf"/>
Copied!
Arguments
as
DataType
string
Required
false
Description
Template variable name to assign; if not specified the ViewHelper returns the variable instead.
extensionName
DataType
string
Required
false
Description
Name of the extension
path
DataType
string
Default
'locallang.xlf'
Required
false
Description
Absolute or relative path to the locallang file
languageKey
DataType
string
Required
false
Description
Key for getting translation of a different than current initialized language
resource.record ViewHelper <vhs:resource.record>
Generic FAL resource ViewHelper.
Warning
This view helper must only be used with FAL resources.
It is not meant to be used as generic data loading view helper.
Arguments
table
DataType
string
Required
true
Description
The table to lookup records.
field
DataType
string
Required
true
Description
The field of the table associated to resources.
record
DataType
mixed
Required
false
Description
The actual record. Alternatively you can use the "uid" argument.
uid
DataType
integer
Required
false
Description
The uid of the record. Alternatively you can use the "record" argument.
as
DataType
string
Required
false
Description
If specified, a template variable with this name containing the requested data will be inserted instead of returning it.
Allows access to the child content based on given arguments.
The ViewHelper is a condition based ViewHelper which means it
supports the f:then and f:else child nodes - you can use
this behaviour to invert the access (i.e. use f:else in a check
if a frontend user is logged in, if you want to hide content
from authenticated users):
<v:security.allow anyFrontendUser="TRUE">
<f:then><!-- protected information displayed --></f:then>
<f:else><!-- link to login form displayed --></f:else>
</v:security.allow>
Copied!
Is the mirror opposite of v:security.deny.
Arguments
then
DataType
mixed
Required
false
Description
Value to be returned if the condition if met.
else
DataType
mixed
Required
false
Description
Value to be returned if the condition if not met.
anyFrontendUser
DataType
boolean
Required
false
Description
If TRUE, allows any FrontendUser unless other arguments disallows each specific FrontendUser
anyFrontendUserGroup
DataType
boolean
Required
false
Description
If TRUE, allows any FrontendUserGroup unless other arguments disallows each specific FrontendUser
frontendUser
DataType
mixed
Required
false
Description
The FrontendUser to allow/deny
frontendUsers
DataType
mixed
Required
false
Description
The FrontendUsers ObjectStorage to allow/deny
frontendUserGroup
DataType
mixed
Required
false
Description
The FrontendUserGroup to allow/deny
frontendUserGroups
DataType
mixed
Required
false
Description
The FrontendUserGroups ObjectStorage to allow/deny
anyBackendUser
DataType
boolean
Required
false
Description
If TRUE, allows any backend user unless other arguments disallows each specific backend user
backendUser
DataType
integer
Required
false
Description
The uid of a backend user to allow/deny
backendUsers
DataType
mixed
Required
false
Description
The backend users list to allow/deny. If string, CSV of uids assumed, if array, array of uids assumed
backendUserGroup
DataType
integer
Required
false
Description
The uid of the backend user group to allow/deny
backendUserGroups
DataType
mixed
Required
false
Description
The backend user groups list to allow/deny. If string, CSV of uids is assumed, if array, array of uids is assumed
admin
DataType
boolean
Required
false
Description
If TRUE, a backend user which is also an admin is required
evaluationType
DataType
string
Default
'AND'
Required
false
Description
Specify AND or OR (case sensitive) to determine how arguments must be processed. Default is AND, requiring all arguments to be satisfied if used
security.deny ViewHelper <vhs:security.deny>
Security: Deny
Denies access to the child content based on given arguments.
The ViewHelper is a condition based ViewHelper which means it
supports the f:then and f:else child nodes.
Is the mirror opposite of v:security.allow.
Arguments
then
DataType
mixed
Required
false
Description
Value to be returned if the condition if met.
else
DataType
mixed
Required
false
Description
Value to be returned if the condition if not met.
anyFrontendUser
DataType
boolean
Required
false
Description
If TRUE, allows any FrontendUser unless other arguments disallows each specific FrontendUser
anyFrontendUserGroup
DataType
boolean
Required
false
Description
If TRUE, allows any FrontendUserGroup unless other arguments disallows each specific FrontendUser
frontendUser
DataType
mixed
Required
false
Description
The FrontendUser to allow/deny
frontendUsers
DataType
mixed
Required
false
Description
The FrontendUsers ObjectStorage to allow/deny
frontendUserGroup
DataType
mixed
Required
false
Description
The FrontendUserGroup to allow/deny
frontendUserGroups
DataType
mixed
Required
false
Description
The FrontendUserGroups ObjectStorage to allow/deny
anyBackendUser
DataType
boolean
Required
false
Description
If TRUE, allows any backend user unless other arguments disallows each specific backend user
backendUser
DataType
integer
Required
false
Description
The uid of a backend user to allow/deny
backendUsers
DataType
mixed
Required
false
Description
The backend users list to allow/deny. If string, CSV of uids assumed, if array, array of uids assumed
backendUserGroup
DataType
integer
Required
false
Description
The uid of the backend user group to allow/deny
backendUserGroups
DataType
mixed
Required
false
Description
The backend user groups list to allow/deny. If string, CSV of uids is assumed, if array, array of uids is assumed
admin
DataType
boolean
Required
false
Description
If TRUE, a backend user which is also an admin is required
evaluationType
DataType
string
Default
'AND'
Required
false
Description
Specify AND or OR (case sensitive) to determine how arguments must be processed. Default is AND, requiring all arguments to be satisfied if used
Default image set to use. Possible values [ 404 | mm | identicon | monsterid | wavatar ]
maximumRating
DataType
string
Required
false
Description
Maximum rating (inclusive) [ g | pg | r | x ]
secure
DataType
boolean
Default
true
Required
false
Description
If it is FALSE will return the un secure Gravatar domain (www.gravatar.com)
uri.image ViewHelper <vhs:uri.image>
Uri: Image
Returns the relative or absolute URI for the image resource
or it's derivate if differing dimesions are provided.
Arguments
additionalAttributes
DataType
mixed
Required
false
Description
Additional tag attributes. They will be added directly to the resulting HTML tag.
data
DataType
mixed
Required
false
Description
Additional data-* attributes. They will each be added with a "data-" prefix.
aria
DataType
mixed
Required
false
Description
Additional aria-* attributes. They will each be added with a "aria-" prefix.
src
DataType
mixed
Required
true
Description
Path to the media resource(s). Can contain single or multiple paths for videos/audio (either CSV, array or implementing Traversable).
relative
DataType
boolean
Default
true
Required
false
Description
If FALSE media URIs are rendered absolute. URIs in backend mode are always absolute.
width
DataType
string
Required
false
Description
Width of the image. This can be a numeric value representing the fixed width of the image in pixels. But you can also perform simple calculations by adding "m" or "c" to the value. See imgResource.width for possible options.
height
DataType
string
Required
false
Description
Height of the image. This can be a numeric value representing the fixed height of the image in pixels. But you can also perform simple calculations by adding "m" or "c" to the value. See imgResource.width for possible options.
maxW
DataType
integer
Required
false
Description
Maximum Width of the image. (no upscaling)
maxH
DataType
integer
Required
false
Description
Maximum Height of the image. (no upscaling)
minW
DataType
integer
Required
false
Description
Minimum Width of the image.
minH
DataType
integer
Required
false
Description
Minimum Height of the image.
format
DataType
string
Required
false
Description
Format of the processed file - also determines the target file format. If blank, TYPO3/IM/GM default is taken into account.
quality
DataType
integer
Default
90
Required
false
Description
Quality of the processed image. If blank/not present falls back to the default quality defined in install tool.
treatIdAsReference
DataType
boolean
Required
false
Description
When TRUE treat given src argument as sys_file_reference record. Applies only to TYPO3 6.x and above.
canvasWidth
DataType
integer
Required
false
Description
Width of an optional canvas to place the image on.
canvasHeight
DataType
integer
Required
false
Description
Height of an optional canvas to place the image on.
canvasColor
DataType
string
Required
false
Description
Background color of an optional canvas to place the image on (hex triplet).
transparencyColor
DataType
string
Required
false
Description
Color to set transparent when using canvas feature (hex triplet).
crop
DataType
string
Required
false
Description
Information generated by the backend's graphical cropping UI
graceful
DataType
boolean
Required
false
Description
Set to TRUE to ignore files that cannot be loaded. Default behavior is to throw an Exception.
uri.request ViewHelper <vhs:uri.request>
Uri: Request
Returns the Uri of the requested page (site_url + all the GET params)
\TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_REQUEST_URL').
Converts $value to $type which can be one of 'string', 'integer',
'float', 'boolean', 'array' or 'ObjectStorage'. If $value is NULL
sensible defaults are assigned or $default which obviously has to
be of $type as well.
Arguments
value
DataType
mixed
Required
false
Description
Value to convert into a different type
type
DataType
string
Required
true
Description
Data type to convert the value into. Can be one of "string", "integer", "float", "boolean", "array" or "ObjectStorage".
default
DataType
mixed
Required
false
Description
Optional default value to assign to the converted variable in case it is NULL.
Or to read names of variables which contain dynamic parts:
<!-- if {variableName} is "Name", outputs value of {dynamicName} -->
{v:variable.get(name: 'dynamic{variableName}')}
Copied!
If your target object is an array with unsequential yet
numeric indices (e.g. {123: 'value1', 513: 'value2'},
commonly seen in reindexed UID map arrays) use
useRawKeys="TRUE" to indicate you do not want your
array/QueryResult/Iterator to be accessed by locating
the Nth element - which is the default behavior.
Do not try `useRawKeys="TRUE"` on QueryResult or
ObjectStorage unless you are fully aware what you are
doing. These particular types require an unpredictable
index value - the SPL object hash value - when accessing
members directly. This SPL indexing and the very common
occurrences of QueryResult and ObjectStorage variables
in templates is the very reason why `useRawKeys` by
default is set to `FALSE`.
Copied!
Arguments
name
DataType
string
Required
false
Description
Name of variable to retrieve
useRawKeys
DataType
boolean
Required
false
Description
If TRUE, the path is directly passed to ObjectAccess. If FALSE, a custom and compatible VHS method is used
Template variable name to assign; if not specified the ViewHelper returns the variable instead.
pattern
DataType
mixed
Required
true
Description
Regex pattern to match against
subject
DataType
mixed
Required
false
Description
String to match with the regex pattern
global
DataType
boolean
Required
false
Description
Match global
variable.set ViewHelper <vhs:variable.set>
Variable: Set
Sets a single variable in the TemplateVariableContainer
scope. The variable then becomes accessible as {var}.
Combines well with v:variable.get to set shorter variable
names referencing dynamic variables, such as:
<v:variable.set name="myObject" value="{v:variable.get(name: 'arrayVariable.{offset}')}" />
<!-- If {index} == 4 then {myObject} is now == {arrayVariable.4} -->
{myObject.name} <!-- corresponds to {arrayVariable.4.name} -->
Copied!
Note that {arrayVariable.{offset}.name} is not possible
due to the way Fluid parses nodes; the above piece of
code would try reading arrayVariable.{offset}.name
as a variable actually called "arrayVariable.{offset}.name"
rather than the correct arrayVariable[offset][name].
In many ways this ViewHelper works like f:alias
with one exception: in f:alias the variable only
becomes accessible in the tag content, whereas v:variable.set
inserts the variable in the template and leaves it there
(it "leaks" the variable).
If $name contains a dot, VHS will attempt to load the object
stored under the named used as the first segment part and
set the value at the remaining path. E.g.
{value -> v:variable.set(name: 'object.property.subProperty')}
would attempt to load {object} first, then set
property.subProperty on that object/array using
ObjectAccess::setPropertyPath(). If {object} is not
an object or an array, the variable will not be set. Please
note: Extbase does not currently support setting variables
deeper than two levels, meaning a name of fx foo.bar.baz
will be ignored. To set values deeper than two levels you
must first extract the second-level object then set the
value on that object.
Using as {value -> v:variable.set(name: 'myVar')} makes {myVar} contain
{value}.
Accesses Typoscript paths. Contrary to the Fluid-native
f:cObject this ViewHelper does not render objects but
rather retrieves the values. For example, if you retrieve
a TypoScript path to a TMENU object you will receive the
array of TypoScript defining the menu - not the rendered
menu HTML.
A great example of how to use this ViewHelper is to very
quickly migrate a TypoScript-menu-based site (for example
currently running TemplaVoila + TMENU-objects) to a Fluid
ViewHelper menu based on v:page.menu or v:page.breadCrumb
by accessing key configuration options such as entryLevel
and even various wrap definitions.
A quick example of how to parse a wrap TypoScript setting
into two variables usable for a menu item:
<!-- This piece to be added as far up as possible in order to prevent multiple executions -->
<v:variable.set name="menuSettings" value="{v:variable.typoscript(path: 'lib.menu.main.stdWrap')}" />
<v:variable.set name="wrap" value="{menuSettings.wrap -> v:iterator.explode(glue: '|')}" />
Copied!
<!-- This in the loop which renders the menu (see "VHS: manual menu rendering" in FAQ): -->
{wrap.0}{menuItem.title}{wrap.1}
Copied!
<!-- An additional example to demonstrate very compact conditions which prevent wraps from being displayed -->
{wrap.0 -> f:if(condition: settings.wrapBefore)}{menuItem.title}{wrap.1 -> f:if(condition: settings.wrapAfter)}
Copied!
Arguments
path
DataType
string
Required
false
Description
Path to TypoScript value or configuration array
variable.unset ViewHelper <vhs:variable.unset>
Variable: Unset
Quite simply, removes a currently available variable
from the TemplateVariableContainer:
<!-- Data: {person: {name: 'Elvis', nick: 'King'}} -->
I'm {person.name}. Call me "{person.nick}". A ding-dang doo!
<v:variable.unset name="person" />
<f:if condition="{person}">
<f:else>
You saw this coming...
<em>Elvis has left the building</em>
</f:else>
</f:if>
Copied!
At the time of writing this, v:variable.unset is not able
to remove members of for example arrays:
<!-- DOES NOT WORK! -->
<v:variable.unset name="myObject.propertyName" />
Using as {value -> v:variable.register.set(name: 'myVar')} makes $GLOBALS["TSFE"]->register['myVar']
contain {value}.
Arguments
value
DataType
mixed
Required
false
Description
Value to set
name
DataType
string
Required
true
Description
Name of register
Changelog
Please follow these links to find out which feature has been implemented or
which bug has been fixed in which version.
See also
The changelog files may have some rendering bugs as they are generated in
Markdown format, which clashes a bit with the usual reST format. If in doubt,
navigate to the GitHub view.
List of versions
Contribution
Unlike most TYPO3 documentation, this manual does not support the
popular Edit on GitHub workflow for manual contributions, as these
documentation files are automatically generated from the ViewHelper
source files - and overwritten on each generation run.
Therefore, contribute to this documentation by editing the appropriate source
files at
To enrich the comment text you can use the common directives of the Markdown
markup language.
Sitemap
Index
format.url.sanitizeString
Sanitizes a string
Arguments
string
DataType
string
Required
false
Description
The string to sanitize.
customMap
DataType
mixed
Required
false
Description
Associative array of additional characters to replace or use to override built-in mappings.
page.menu
Page: Menu ViewHelper
ViewHelper for rendering TYPO3 menus in Fluid
Supports both automatic, tag-based rendering (which
defaults to ul > li with options to set both the
parent and child tag names. When using manual rendering
a range of support CSS classes are available along
with each page record.
DEPRECATED: use v:menu instead
Arguments
additionalAttributes
DataType
mixed
Required
false
Description
Additional tag attributes. They will be added directly to the resulting HTML tag.
data
DataType
mixed
Required
false
Description
Additional data-* attributes. They will each be added with a "data-" prefix.
aria
DataType
mixed
Required
false
Description
Additional aria-* attributes. They will each be added with a "aria-" prefix.
class
DataType
string
Required
false
Description
CSS class(es) for this element
dir
DataType
string
Required
false
Description
Text direction for this HTML element. Allowed strings: "ltr" (left to right), "rtl" (right to left)
id
DataType
string
Required
false
Description
Unique (in this file) identifier for this HTML element.
lang
DataType
string
Required
false
Description
Language for this element. Use short names specified in RFC 1766
style
DataType
string
Required
false
Description
Individual CSS styles for this element
title
DataType
string
Required
false
Description
Tooltip text of element
accesskey
DataType
string
Required
false
Description
Keyboard shortcut to access this element
tabindex
DataType
integer
Required
false
Description
Specifies the tab order of this element
onclick
DataType
string
Required
false
Description
JavaScript evaluated for the onclick event
forceClosingTag
DataType
boolean
Required
false
Description
If TRUE, forces the created tag to use a closing tag. If FALSE, allows self-closing tags.
hideIfEmpty
DataType
boolean
Required
false
Description
Hide the tag completely if there is no tag content
contenteditable
DataType
string
Required
false
Description
Specifies whether the contents of the element are editable.
contextmenu
DataType
string
Required
false
Description
The value of the id attribute on the menu with which to associate the element as a context menu.
draggable
DataType
string
Required
false
Description
Specifies whether the element is draggable.
dropzone
DataType
string
Required
false
Description
Specifies what types of content can be dropped on the element, and instructs the UA about which actions to take with content when it is dropped on the element.
translate
DataType
string
Required
false
Description
Specifies whether an elements attribute values and contents of its children are to be translated when the page is localized, or whether to leave them unchanged.
spellcheck
DataType
string
Required
false
Description
Specifies whether the element represents an element whose contents are subject to spell checking and grammar checking.
hidden
DataType
string
Required
false
Description
Specifies that the element represents an element that is not yet, or is no longer, relevant.
showAccessProtected
DataType
boolean
Required
false
Description
If TRUE links to access protected pages are always rendered regardless of user login status
classAccessProtected
DataType
string
Default
'protected'
Required
false
Description
Optional class name to add to links which are access protected
classAccessGranted
DataType
string
Default
'access-granted'
Required
false
Description
Optional class name to add to links which are access protected but access is actually granted
useShortcutUid
DataType
boolean
Required
false
Description
If TRUE, substitutes the link UID of a shortcut with the target page UID (and thus avoiding redirects) but does not change other data - which is done by using useShortcutData.
useShortcutTarget
DataType
boolean
Required
false
Description
Optional param for using shortcut target instead of shortcut itself for current link
useShortcutData
DataType
boolean
Required
false
Description
Shortcut to set useShortcutTarget and useShortcutData simultaneously
tagName
DataType
string
Default
'ul'
Required
false
Description
Tag name to use for enclosing container
tagNameChildren
DataType
string
Default
'li'
Required
false
Description
Tag name to use for child nodes surrounding links. If set to "a" enables non-wrapping mode.
entryLevel
DataType
integer
Required
false
Description
Optional entryLevel TS equivalent of the menu
levels
DataType
integer
Default
1
Required
false
Description
Number of levels to render - setting this to a number higher than 1 (one) will expand menu items that are active, to a depth of $levels starting from $entryLevel
expandAll
DataType
boolean
Required
false
Description
If TRUE and $levels > 1 then expands all (not just the active) menu items which have submenus
classFirst
DataType
string
Required
false
Description
Optional class name for the first menu elment
classLast
DataType
string
Required
false
Description
Optional class name for the last menu elment
classActive
DataType
string
Default
'active'
Required
false
Description
Optional class name to add to active links
classCurrent
DataType
string
Default
'current'
Required
false
Description
Optional class name to add to current link
classHasSubpages
DataType
string
Default
'sub'
Required
false
Description
Optional class name to add to links which have subpages
substElementUid
DataType
boolean
Required
false
Description
Optional parameter for wrapping the link with the uid of the page
showHiddenInMenu
DataType
boolean
Required
false
Description
Include pages that are set to be hidden in menus
showCurrent
DataType
boolean
Default
true
Required
false
Description
If FALSE, does not display the current page
linkCurrent
DataType
boolean
Default
true
Required
false
Description
If FALSE, does not wrap the current page in a link
linkActive
DataType
boolean
Default
true
Required
false
Description
If FALSE, does not wrap with links the titles of pages that are active in the rootline
titleFields
DataType
string
Default
'nav_title,title'
Required
false
Description
CSV list of fields to use as link label - default is "nav_title,title", change to for example "tx_myext_somefield,subtitle,nav_title,title". The first field that contains text will be used. Field value resolved AFTER page field overlays.
includeAnchorTitle
DataType
boolean
Default
true
Required
false
Description
If TRUE, includes the page title as title attribute on the anchor.
includeSpacers
DataType
boolean
Required
false
Description
Wether or not to include menu spacers in the page select query
deferred
DataType
boolean
Required
false
Description
If TRUE, does not output the tag content UNLESS a v:page.menu.deferred child ViewHelper is both used and triggered. This allows you to create advanced conditions while still using automatic rendering
as
DataType
string
Default
'menu'
Required
false
Description
If used, stores the menu pages as an array in a variable named after this value and renders the tag content. If the tag content is empty automatic rendering is triggered.
rootLineAs
DataType
string
Default
'rootLine'
Required
false
Description
If used, stores the menu root line as an array in a variable named according to this value and renders the tag content - which means automatic rendering is disabled if this attribute is used
excludePages
DataType
mixed
Required
false
Description
Page UIDs to exclude from the menu. Can be CSV, array or an object implementing Traversable.
forceAbsoluteUrl
DataType
boolean
Required
false
Description
If TRUE, the menu will be rendered with absolute URLs
doktypes
DataType
mixed
Required
false
Description
DEPRECATED: Please use typical doktypes for starting points like shortcuts.
divider
DataType
string
Required
false
Description
Optional divider to insert between each menu item. Note that this does not mix well with automatic rendering due to the use of an ul > li structure
pageUid
DataType
integer
Required
false
Description
Optional parent page UID to use as top level of menu. If left out will be detected from rootLine using $entryLevel
Reference to the headline
Copy and freely share the link
This link target has no permanent anchor assigned.The link below can be used, but is prone to change if the page gets moved.