Tutorial 5: Hooks¶
The configuration options that can be used in the SAV Library Kickstarter makes it possible to generate the rendering in most of the cases. However, when more complex renderings are required, hooks can be used either in the extension itself or in another extension extension.
The extension sav_library_example5 illustrates the use of a hook.
The extension defines three fields: a field named
title and two working fields
field2. The aim of this example is to render
field2 in the
Single view, by means of a FLUID template,
such that their content are ordered in the ascending order.
Hooks are useful when the processing associated with the rendering is more complex than simply displaying fields. Indeed, since FLUIDTEMPLATE is a TypoScript content object, it can be used with the tsObject and tsProperties attributes (see Tutorial 10 for an example).