@php use Botble\Base\Facades\BaseHelper; use Botble\Media\Facades\RvMedia; /** * Banner-side carousel composite (home-baby.html §6 "Favorite", lines 4696-5184): *
*
title + col-right View All
*
*
* <-- tall banner *
*
*
...
<-- 6 cards, 3x2 *
*
* * Shortcode attrs (mirrors style-grid-with-banner): * custom_title, custom_subtitle — section heading (rendered here) * view_all_text, view_all_url — col-right CTA link * banner_image, banner_heading, banner_subheading, banner_button_text, banner_button_url * source, limit (=6 expected) — passed through standard shortcode handler * * The parent index.blade.php only renders its own centered heading when the * shortcode `title`/`subtitle` is set — leave those blank and use custom_* here. */ $heading = (string) ($shortcode->custom_title ?? ''); $subheading = (string) ($shortcode->custom_subtitle ?? ''); $viewAllText = (string) ($shortcode->view_all_text ?? __('View All Products')); $viewAllUrl = (string) ($shortcode->view_all_url ?? '#'); $bannerImage = (string) ($shortcode->banner_image ?? ''); $bannerHead = (string) ($shortcode->banner_heading ?? ''); $bannerSub = (string) ($shortcode->banner_subheading ?? ''); $bannerBtn = (string) ($shortcode->banner_button_text ?? __('View All Products')); $bannerUrl = (string) ($shortcode->banner_button_url ?? '#'); $list = collect($products); @endphp @if ($heading !== '' || $subheading !== '')
@if ($heading !== '')

{!! BaseHelper::clean($heading) !!}

@endif @if ($subheading !== '')

{!! BaseHelper::clean($subheading) !!}

@endif
@endif
@if ($bannerImage !== '') @endif
@if ($list->isNotEmpty())
@foreach ($list as $product)
@includeIf(Theme::getThemeNamespace('views.ecommerce.includes.product-item'), [ 'product' => $product, 'productWrapperClass' => 'square', ])
@endforeach
@endif