[TYPO3-dev] Problem with Feature: #66369 - Added LinkBrowser APIs

Roman Crescente roman.crescente at bernetimux.ch
Thu Jan 7 12:31:12 CET 2016


TYPO3.CMS/Releases/7.6/Feature

#66369 - "Handler implementation"

I made a copy of PageLinkHandler for a own handling, all works fine.. but 1 point is a Problem.

when I integrate with:
\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\CMS\Core\Page\PageRenderer')->loadRequireJsModule('TYPO3/CMS/Recordlist/FlexShadowboxLinkHandler');

and put my File "FlexShadowboxLinkHandler" to the Core at "sysext\recordlist\Resources\Public\JavaScript"
then it works.. but it is not nice to have the own JS in the typo3 directory. 

So I tryed to include it from my own extension, with: 
\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\CMS\Core\Page\PageRenderer')->addJsFile($jsFile,'text/javascript');
or
\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\CMS\Core\Page\PageRenderer')->addJsInlineCode('RequireJS-Module-TYPO3/CMS/Recordlist/FlexShadowboxLinkHandler',$javaScriptCode);

that works too, the JS is found and executed but, after inlcuding the JS gives me an error because this Line: 
define(['jquery', 'TYPO3/CMS/Recordlist/LinkBrowser'], function($, LinkBrowser) 

JS says there is a type missmatch.. it knows nothing, not "LinkBrowser" and nod jquery" but both files are included correctly somme lines above. 

Its a 1:1 copy of the Example from the Documentation or the "PageLinkHandler.js". But in the Docs isnt written, how to include a own JS without put it into the T3 directory.


I want to have my own linkhandler in my extension and not a own wich I must put into the typo3 directory, that it works.





More information about the TYPO3-dev mailing list