dv: namespace. Core registers it automatically. Pro does not ship a separate ViewHelper package.
A ViewHelper is a Fluid tag that runs PHP code while the template is rendered. The Tonictypes ViewHelpers let a template do things that normally need a plugin setting: load a datatype or record by uid, filter or group a list of records, build links to detail pages, and render other Tonictypes templates. They work in every Fluid template of the site, not only in Tonictypes plugins.
Namespace
dv maps to K3n\Tonictypes\ViewHelpers. Declaring it in the template is optional, but helps IDE autocompletion:
template.render
Renders a TypoScript template identifier or a file path. Use it to split templates into reusable parts — for example one “teaser” template used by a list, a slider and a search result — and to cache expensive parts of the output.datatype.get
Fetches a Datatype by UID. You need the datatype object fordv:record.get and dv:filter.records when the template is not rendered by a plugin that already provides {datatype}.
record.get
Fetches a record by UID. Use it to show one specific record anywhere, for example a highlighted article in a sidebar template.link.record / uri.record
Link or URL to a detail page (usually{detailPid} from the plugin).
dv:link.record renders an <a> tag, dv:uri.record returns only the URL (for example for a data-href attribute). Both add the record uid as tx_tonictypes_dynamic[record], which the Record Dynamic Detail plugin on the target page reads — see Frontend Plugins.
filter.records
Filter an already injected list (or load viadatatype).
Use it when one plugin should show the same records in several filtered blocks (for example “open” and “closed” jobs), or when a template outside a plugin needs a filtered query. For a single filtered list, the plugin’s own Filters are simpler.
equal, not_equal, in, contains, begins_with, ends_with, is_empty, is_null, and related variants.
group.recordsByProperty
Groups records by a property. Typical uses are an A–Z index, records grouped by category, or events grouped by month. The result is an array ofvalue => records, which you loop over with two nested f:for tags.
f:variable tag keeps the returned array, so the f:for loops can use it.
Also available
dv:backend.*, dv:format.*, string/array helpers, dv:typo3.isVersion.
The dv:format.* group includes dv:format.flexFormToArray, which turns the XML of a FlexForm field into an array (see Tonictypes Pro → FlexForm Field). dv:typo3.isVersion lets one template support several TYPO3 versions.
Predefined templates: Templating.