1

I'm currently trying to create a node resolver for a TCA column. I've added a resolver and an element. The render function in the element class looks like this

public function render()
{
    $resultArray = $this->initializeResultArray();
    $resultArray['requireJsModules'][] = 'MyVendor/MyExtension/MyModule';
    $resultArray['html'] = 'Hallo Welt';
    return $resultArray;
}

The extjs modules is placed in typo3conf/ext/my_extension/Resources/Public/JavaScript/MyModule.js

When TYPO3 renders my element, it renders the html part and tries to load the extjs module with the path typo3/MyVendor/MyExtension/MyModule.js

My question now is, how can I add my custom extjs module, that is injected by require function in JavaScript?

I'm using TYPO3 7.6.15.

I'm thankful for every help :)

1
  • Please keep in mind that ExtJS is deprecated and will be removed in future TYPO3 versions (properly in v9). Commented Jan 30, 2017 at 22:26

1 Answer 1

1

Just found the answer here https://forum.typo3.org/index.php/t/210780/ The module needs to have TYPO3/CMS as vendor. Than it load loaded correctly.

public function render()
{
    $resultArray = $this->initializeResultArray();
    $resultArray['requireJsModules'][] = 'TYPO3/CMS/MyExtension/MyModule';
    $resultArray['html'] = 'Hallo Welt';
    return $resultArray;
}

The module needs to be in typo3conf/ext/my_extension/Resources/Public/JavaScript/MyModule.js

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.