EFTEC / BladeOne

The standalone version Blade Template Engine without Laravel in a single php file and without dependencies
https://www.escuelainformatica.cl/
Other
775 stars 120 forks source link

Including views from diffrent view folders/Multiple base paths #140

Closed Stantastic closed 2 years ago

Stantastic commented 3 years ago

I'm working on a modular app where modules will have templates as well. It could look like this:

App: resources/views/master.blade.php

Module: module/views/mymodule.blade.php

How would I be able to load files dynamically from folders that are not in in the apps base template directory?

For laravels blade I found this: https://laravel.io/forum/11-08-2015-solved-render-view-from-other-path

jorgecc commented 3 years ago

you can use (start with "/") "/someurl/module/views.mymodule.blade.php" if you want to use an absolute path.