@php use Botble\Base\Facades\BaseHelper; use Botble\Media\Facades\RvMedia; /** * 2-up product-spotlight pair under a centered section heading — * mirrors html/home-garden.html lines 2624-2700 ("Plant Care, Elevated for Home"). * * Markup: *
*

...

...

*
*
...
*
...
* * Each cell: image (square 400x400) + title link + description + "Buy now - $X.XX" CTA. * The `ips-1` / `ips-2` class hooks the floating decorative PNG (garden-item-2.png) the demo overlays. * * Shortcode attrs (admin-driven): * heading, subheading — section title + subtitle * image_1, title_1, desc_1, price_1, link_1 * image_2, title_2, desc_2, price_2, link_2 * button_text (default "Buy now") */ $heading = (string) ($shortcode->heading ?? ''); $subheading = (string) ($shortcode->subheading ?? ''); $items = []; for ($i = 1; $i <= 2; $i++) { $img = (string) ($shortcode->{"image_$i"} ?? ''); $title = (string) ($shortcode->{"title_$i"} ?? ''); if ($img === '' && $title === '') { continue; } $items[] = [ 'image' => $img, 'title' => $title, 'desc' => (string) ($shortcode->{"desc_$i"} ?? ''), 'price' => (string) ($shortcode->{"price_$i"} ?? ''), 'link' => (string) ($shortcode->{"link_$i"} ?? '#'), 'ips' => "ips-$i", ]; } $btnText = trim((string) ($shortcode->button_text ?? __('Buy now'))); @endphp
@if ($heading !== '' || $subheading !== '')
@if ($heading !== '')

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

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

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

@endif
@endif @if (! empty($items)) @endif