Jump to content

Error executing widget from template


Recommended Posts

  • 4 years later...

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...