Comments (5)
Hi, there could be a couple of reasons. So some question from my side:
- How do you include the TypoScript?
- Do you correctly set the template in your widget?
- Have you checked whether the paths are correct?
- Do you get any error message / exception?
from custom_dashboard_widgets.
Hi, thanks for taking the time.
- First I tried my main setup.typoscript -> no effect, then I tried Template->Setup of my root page -> also no effect.
- I think so. In my renderWidgetContent() method in RecentOrdersWidget.php I got the following: $this->view->setTemplate('Widget/RecentOrdersWidget');
- The above paths are definitly correct. After looking at the error message it seems as if there are no paths set at all.
- Yes, take a look:
Btw: I'm using TYPO3 v11. Maybe something changed?
from custom_dashboard_widgets.
The above paths are definitly correct. After looking at the error message it seems as if there are no paths set at all.
Are the core widgets working?
Could you please try to include the TypoScript globally with ExtensionManagementUtility::addTypoScriptSetup()
in your ext_localconf.php
, like done by this extension: https://github.com/o-ba/custom_dashboard_widgets/blob/main/ext_localconf.php#L8
from custom_dashboard_widgets.
Hi, well I tried to include it via addTypoScriptSetup() - But the result is the same as with ::addStaticFile().
But then I had a lucky find while looking at the StandaloneView class. It's possible to set the Template/Layout/Partial Paths via PHP. And it worked right away. The widget is showing up.
$this->view->setTemplateRootPaths(['EXT:ext/Resources/Private/Templates/Dashboard/']);
$this->view->setLayoutRootPaths(['EXT:ext/Resources/Private/Templates/Dashboard/']);
$this->view->setPartialRootPaths(['EXT:ext/Resources/Private/Templates/Dashboard/']);
Thanks again for the help 👌
from custom_dashboard_widgets.
Sorry, but this is not done. My typoscript is shown in Backend but the path to the template is not taken.
from custom_dashboard_widgets.
Related Issues (4)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from custom_dashboard_widgets.