Themes and @include in blade template

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!
krzysiekp
Posts: 85
Joined: 05 Nov 2021, 16:19

Themes and @include in blade template

Post by krzysiekp » 11 May 2022, 19:38

In packages\new-theme\client\html\templates\checkout\standard\summary-body-standard.blade.php
I have below code:

Code: Select all

 @include('common/summary/detail-standard',[
                        'summaryBasket' => $standardBasket,
                        'summaryTaxRates' => $summaryTaxRates ?? [],
                        'summaryNamedTaxes' => $summaryNamedTaxes ?? [],
                        'summaryCostsPayment' => $summaryCostsPayment ?? 0,
                        'summaryCostsDelivery' => $summaryCostsDelivery ?? 0,
                        'summaryShowDownloadAttributes' => $summaryShowDownloadAttributes ?? [],
                    ])
This code causes the error:

Code: Select all

View [common.summary.detail-standard] not found. (View: C:\xampp\htdocs\giftcard\vendor\aimeos-themes\new-theme-sk\client\html\templates\checkout\standard\summary-body-standard.blade.php)
I try use

Code: Select all

@include('new-theme::common/summary/detail-standard' ....
but still not working

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

Re: Themes and @include in blade template

Post by aimeos » 13 May 2022, 06:26

Laravel uses dots instead of slashes for separating directories, e.g. "common.summary.detail-standard" (for whatever reason):
https://laravel.com/docs/9.x/blade#including-subviews

Furthermore, it may load Blade views only from the standard Laravel view directories like "resources/views".
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

krzysiekp
Posts: 85
Joined: 05 Nov 2021, 16:19

Re: Themes and @include in blade template

Post by krzysiekp » 13 May 2022, 06:59

Do you have somewhere converted all Aimeos template (ai-client-html\client\html\templates) to Laravel Blade ?

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

Re: Themes and @include in blade template

Post by aimeos » 13 May 2022, 07:02

No. We want to see how we can use the Blade template engine for the existing PHP files in the future.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply