Created
May 8, 2019 10:02
-
-
Save nickwanhere/bab8ce3caf157456ebce283ace68fe95 to your computer and use it in GitHub Desktop.
Craft 3 Plugin Render Template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$view = Craft::$app->getView(); | |
$view->setTemplateMode($view::TEMPLATE_MODE_SITE); | |
$html = $view->renderTemplate('report', ['entry' => $entry]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment