Describe the bug
Using Leaf 4.0 / BareUI v1.2 : When including a sub-template in a template :
<?php echo $template->render('page'); ?>
I get an error
Error: Call to a member function render() on string
Expected behavior
According to doc (https://leafphp.dev/docs/frontend/bareui.html#sub-templates-partials), the $template variable should be available and should refer to the BareUI Engine.
Additional context
The variable $template is a string, its value is 'Leaf\BareUI' instead of the class.
Workaround, replacing $template with app()->template() is ok.