Render template in controller and return as json response

  • I want to dynamicly load templates in pagekit. For that I have to render a template in a controller which returns a json response. On client side, I ajax the template and insert it into the website e.g. with v-html.

    The main question, is about to render a partial template on server side in the contoller. Some hints?

    The LORD is my strength and my shield; in him my heart trusts, and I am helped; my heart exults, and with my song I give thanks to him. Psalm 28,7