New answers tagged


Did you manage this integration?


I think you're using Craft 2 syntax. This should work in Craft 3: $vars = ['foo' => 'bar']; // variables loaded into the template $mode = 'cp'; // or "site" $html = Craft::$app->view->renderTemplate('path/to/template', $vars, $mode); return $html;


I'm assuming that groupChair is an entries field, correct? So what you're expecting from groupChair is a related entry associated with the current entry through that field? The output you're seeing is the result of outputting an element query directly, which is a common mistake. To actually get to the related entry, you need to execute the query using .all() ...


You could potentially use Twig's replace filter to replace any instance of h2 with h3. If for some reason that's not powerful enough, there's also the Retcon plugin which could work too - specifically the change method:

Top 50 recent answers are included