Feature #88945

add Shim Library javascript - for f:be.container / f:be.pagerenderer ViewHelpers

Added by Christian Hackl 6 days ago. Updated 5 days ago.

Status:
Needs Feedback
Priority:
Should have
Assignee:
-
Category:
Fluid
Target version:
-
Start date:
2019-08-11
Due date:
% Done:

0%

PHP Version:
7.2
Tags:
fluid, viewhelper, backend
Complexity:
Sprint Focus:

Description

Add a way (e.g. with an attribute like 'includeJsFiles') for Shim Library javascript to use with f:be.container / f:be.pagerenderer ViewHelpers.

https://docs.typo3.org/m/typo3/reference-coreapi/master/en-us/ApiOverview/JavaScript/RequireJS/Shim/Index.html

History

#1 Updated by Andreas Fernandez 6 days ago

  • Status changed from New to Needs Feedback

You can register your own shims in a global scope for example via ext_localconf.php, like it's done in EXT:t3editor.

It could look like this example:

if (TYPO3_REQUESTTYPE & TYPO3_REQUESTTYPE_BE) {
    \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
        \TYPO3\CMS\Core\Page\PageRenderer::class
    )->addRequireJsConfiguration([
        'shim' => [
            'foobar' => [
                // whatever belongs here
            ],
        ],
    ]);
}

Does this help to solve your issue?

#2 Updated by Christian Hackl 5 days ago

something similar I have already as (for me) "workaround" in my controller, and yes this works - but it is also not an issue but a feature request ;)

Anyway, thanks for the answer :)

Also available in: Atom PDF