croct_script
Learn how to render the client-side SDK loader.
This Twig function renders the <script> tags that load and bootstrap the client-side SDK in the browser.
The bundle injects them automatically when script.auto_inject is enabled, which is the default, so use this function only when you disable automatic injection to control the placement yourself.
Signature
This function has the following signature:
{{ croct_script(nonce = null) }}Example
Here is a basic example of how to use this function:
templates/base.html.twig
<head> {{ croct_script() }}</head>Parameters
The following list describes the supported parameters:
- nonce(optional)string
A Content Security Policy nonce added to the generated script tags.
Default:null