JBW Posted June 10, 2019 Share Posted June 10, 2019 Hi, I'm follwing the instructions on https://devdocs.prestashop.com/1.7/modules/concepts/widgets/ to execute a widget on 1.7.5. with {widget name="mywidget"} in a .tpl file. But I get an error that {widget} is unknown tag. Any idea how to solve this? Thanks Link to comment Share on other sites More sharing options...
elementChaosu Posted November 28, 2023 Share Posted November 28, 2023 Partly blind shot, but is your tpl rendered via controller, which implements widget interface? I run to this problem for this reason. You can send widget content into tpl as variable like this: $ModuleWithWidget = new ModuleWithWidget(); $this->context->smarty->assign([ 'myWidget' => $ModuleWithWidget->renderWidget(), ]); and then call $myWidget variable in tpl. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now