I know this question has been asked multiple times. I have read all the post on this topic, and craft's docs. But still, I haven't figure out what I'm doing wrong. I would really appreciate a hand here!
I'm using Craft 3.7, and I am trying to render a template file, which is called from my module's twig extension.
I have this:
The template file is in
'modules' => [ 'password-global' => abc\passwordglobal\PasswordGlobal::class, ], 'bootstrap' => ['password-global']
And in my twig extension file, I have a function with this code:
// ... returns html template; $oldMode = \Craft::$app->view->getTemplateMode(); \Craft::$app->view->setTemplateMode(View::TEMPLATE_MODE_CP); $html = \Craft::$app->view->renderTemplate('password-global/templates/_formTemplate'); \Craft::$app->view->setTemplateMode($oldMode); return $html;
And the error I see:
Twig Template Loading Error – craft\web\twig\TemplateLoaderException
Unable to find the template “password-global/templates/_formTemplate”.
Thank you so much.