since it’s not called by the CMS it’s missing some functionality I guess. Is there a way to include a partial inside a view and still pass data to the partial?
I also tried the include function from twig include - Documentation - Twig - The flexible, fast, and secure PHP template engine but I’m not sure what location path to use since I’m getting “file not found” for every combination
If I’m not mistaken, the back end partials don’t accept any twig values, but they have PHP functionality so you can write PHP functions inside of the view file.
Partials depend heavily on the CMS controller lifecycle and aren’t supported by Laravel’s view engine because of this. Using {% include %} is the closest you’ll get.
You can render partials programatically by creating an instance of the CMS Controller and calling renderPartial()
$controller = Controller::getController() ?: new Controller;
$controller->renderPartial('...');
Hi,
now I’m facing the path problem. What is the root of renderPartail when it looks for partials? I tried every single combination and I’m getting an empty output. Is there a way to debug this?
renderPartial is called from here
/plugins/acme/blog/views/test1/main.htm
and the partial is here
/plugins/acme/blog/views/test1/partials/test_partial.htm