.. include:: /Includes.rst.txt .. _view-helpers: =========== ViewHelpers =========== .. contents:: :local: :depth: 1 PreviewLinksViewHelper ====================== Usage: ------ .. code-block:: html Parameters: ----------- uid: ~~~~ Uid of the mail page pageId: ~~~~~~~ Page id of the mail-sys-folder containing the mail configuration `mod.web_modules.mail.sendOptions`. Returns: -------- Preview-links, title, languageUid and flag-icon-identifiers for every language and type (plain/html), grouped by types. The types (plain and/or html) will be taken from the Page TSconfig parameter `mod.web_modules.mail.sendOptions` from the given `pageId`, defined with e.g. the :ref:`mail configuration module under "Mail format (default)" `. GetBodyContentViewHelper ======================== Extract the body tag content of the mail html content. Used to embed the mail html content. Usage: ------ .. code-block:: html {mail.htmlContent -> mail:getBodyContent()} RemoveMailBoundariesViewHelper ============================== Remove the mail boundaries from the mail plain content. Used to embed the mail plain text content. Usage: ------ .. code-block:: html {mail.plainContent -> mail:removeMailBoundaries()} .. _view-helpers-emogrify: EmogrifyViewHelper ================== Writes the rules of a CSS as inline styles into the given HTML and can remove the class attributes afterwards. It does the same as the content object :ref:`EMOGRIFIER `, but inside of a Fluid template. Usage: ------ .. code-block:: html Parameters: ----------- css: ~~~~ The CSS as string. Style blocks which are part of the HTML are inlined as well. Default: empty string .. versionchanged:: 4.3.0 The argument has the default value :php:`''`. Before, it was :php:`null` if it was omitted. extractContent: ~~~~~~~~~~~~~~~ Return only the content between the body tags. The head and with it the style block with the rules which could not be inlined are dropped then. Default: :php:`false` options: ~~~~~~~~ Options of the CSS inliner as array, see :ref:`options ` of the content object. removeClassAttributes: ~~~~~~~~~~~~~~~~~~~~~~ Remove the class attributes after the CSS has been inlined. Default: :php:`false` .. versionadded:: 4.3.0 keepOnTags: ~~~~~~~~~~~ Comma separated list of tag names (e.g. :html:`table, td`), whose class attribute is kept. Only used together with :html:`removeClassAttributes`. Default: empty string .. versionadded:: 4.3.0 keepClasses: ~~~~~~~~~~~~ Comma separated list of class names (e.g. :html:`body, btn`), which are kept on all other elements. Only used together with :html:`removeClassAttributes`. Default: empty string .. versionadded:: 4.3.0 smartClassRemoval: ~~~~~~~~~~~~~~~~~~ Keep the classes which are still needed by CSS rules that could not be inlined, e.g. `body` for the rule `.body a:hover`. Only used together with :html:`removeClassAttributes`. Do not combine it with :html:`extractContent`, because the style block with these rules is dropped then. Default: :php:`false` .. versionadded:: 4.3.0 Returns: -------- The HTML with inline styles. The output is not escaped. See :ref:`Removing class attributes ` for details and an example. ConstantViewHelper ================== Usage: ------ .. code-block:: html Content for all content for category 1 content for category 1, 2 and 3 Parameters: ----------- name: ~~~~~ Name of the constant classFQN: ~~~~~~~~~ Full qualified name of the class containing the constants. Default: :php:`MEDIAESSENZ\\Mail\\Constants` Returns: -------- The value of the constant if exists, otherwise null.