Be.pageRenderer ViewHelper <f:be.pageRenderer> 

ViewHelper to register backend module resources like CSS and JavaScript using the PageRenderer.

Go to the source code of this ViewHelper: Be\PageRendererViewHelper.php (GitHub).

Table of contents

Examples 

All options:

packages/my_extension/Resources/Private/Templates/Module/Index.fluid.html
<f:be.pageRenderer
  pageTitle="foo"
  includeCssFiles="{0: 'EXT:my_ext/Resources/Public/Css/Stylesheet.css'}"
  includeJsFiles="{0: 'EXT:my_ext/Resources/Public/JavaScript/Library1.js', 1: 'EXT:my_ext/Resources/Public/JavaScript/Library2.js'}"
  addJsInlineLabels="{'my_ext.label1': 'LLL:EXT:my_ext/Resources/Private/Language/locallang.xlf:label1'}"
  includeJavaScriptModules="{0: '@my-vendor/my-ext/my-module.js'}"
  addInlineSettings="{'some.setting.key': 'some.setting.value'}"
/>
Copied!

This will load the specified css, js files and JavaScript modules, adds a custom js inline setting, and adds a resolved label to be used in js.

Arguments of the <f:be.pageRenderer> ViewHelper 

addInlineSettings

addInlineSettings
Type
array
Adds Javascript Inline Setting

addJsInlineLabels

addJsInlineLabels
Type
array
Custom labels to add to JavaScript inline labels

includeCssFiles

includeCssFiles
Type
array
List of custom CSS file to be loaded

includeJavaScriptModules

includeJavaScriptModules
Type
array
List of JavaScript modules to be loaded

includeJsFiles

includeJsFiles
Type
array
List of custom JavaScript file to be loaded

pageTitle

pageTitle
Type
string
Default
''
title tag of the module. Not required by default, as BE modules are shown in a frame