Render a template file from a controller
Permalink
Hello again,
I want to render a template within a controller to pass the rendered template back to the ajax caller. What is the best way to do this.
How can i load templates from a custom template folder located in my package?
In Zend Framework projects it is easy to do this. But how it goes in Concrete5?
Playing around with the "View" object failed cause either a "theme" is missing or the template path is the core view path from C5. Setting the view path with "setViewRootDirectoryName" appends my path to the view path from C5 ... frustrating.
Currently i use 5.7.4RC1 for developing my page.
I want to render a template within a controller to pass the rendered template back to the ajax caller. What is the best way to do this.
How can i load templates from a custom template folder located in my package?
In Zend Framework projects it is easy to do this. But how it goes in Concrete5?
Playing around with the "View" object failed cause either a "theme" is missing or the template path is the core view path from C5. Setting the view path with "setViewRootDirectoryName" appends my path to the view path from C5 ... frustrating.
Currently i use 5.7.4RC1 for developing my page.
I don't know if this is the prefered way, but currently it works for me.