Extending base template view from the package folder

Help for integrating the Laravel package
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
pamirsawar
Posts: 15
Joined: 17 Aug 2022, 04:19

Extending base template view from the package folder

Post by pamirsawar » 06 Sep 2022, 05:53

Hello aimeos!

I've created a new extension through but some views files are not extending from the package folder.
for example base.blade.php and jqadm/index.blade.php.

But I am able to override these templates after I put them into the resource/views/vendor/shop folder.

Is this a bug or does it not configured properly for me?

I want to extend base.blade.php view but only for that extension/theme.


aimeos-laravel: 2022.07.2
windows 10
php 8.1

User avatar
aimeos
Administrator
Posts: 7889
Joined: 01 Jan 1970, 00:00

Re: Extending base template view from the package folder

Post by aimeos » 07 Sep 2022, 16:09

The jqadm/index.blade.php file cannot be theme specific because the backend doesn't support different themes per site. You can only overwrite it once in the resources/views/vendor/shop/jqadm/index.blade.php folder.

The resources/views/vendor/shop/base.blade.php can be overwritten by several themes and you can select the theme in the admin backend for each site. Just make sure that your other Blade files in the theme (resources/views/vendor/shop/catalog/* Blade templates for example) extend from your base.blade.php file in that theme.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

pamirsawar
Posts: 15
Joined: 17 Aug 2022, 04:19

Re: Extending base template view from the package folder

Post by pamirsawar » 08 Sep 2022, 06:05

Thanks for the reply. It's working perfectly now.

I added this "@extends('<package name>::base')" in the blade files in my package. Which was removed by me while copy pasting the files from the vendor folder which now I realized I should not have done that.

Post Reply