Coder Social home page Coder Social logo

Comments (5)

o-ba avatar o-ba commented on June 29, 2024

Hi, there could be a couple of reasons. So some question from my side:

  1. How do you include the TypoScript?
  2. Do you correctly set the template in your widget?
  3. Have you checked whether the paths are correct?
  4. Do you get any error message / exception?

from custom_dashboard_widgets.

mewcrazy avatar mewcrazy commented on June 29, 2024

Hi, thanks for taking the time.

  1. First I tried my main setup.typoscript -> no effect, then I tried Template->Setup of my root page -> also no effect.
    image
  2. I think so. In my renderWidgetContent() method in RecentOrdersWidget.php I got the following: $this->view->setTemplate('Widget/RecentOrdersWidget');
    image
  3. The above paths are definitly correct. After looking at the error message it seems as if there are no paths set at all.
  4. Yes, take a look:
    image

Btw: I'm using TYPO3 v11. Maybe something changed?

from custom_dashboard_widgets.

o-ba avatar o-ba commented on June 29, 2024

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.

mewcrazy avatar mewcrazy commented on June 29, 2024

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.

andreknieriem avatar andreknieriem commented on June 29, 2024

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 photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.