@php /** * Asymmetric 1-tall + 2-stacked banner grid — mirrors * html/home-bag-accessories.html lines 1320-1389. * * Layout: *
*
[collection 1 — tall image with overlay text] *
*
[collection 2 — image + text below] *
[collection 3 — image + text below] * * Expects exactly 3 collections; gracefully degrades if fewer. */ $list = collect($collections)->values(); $left = $list->get(0); $right1 = $list->get(1); $right2 = $list->get(2); // Per-cell description (eyebrow under headline). Fall back to collection // description; admins can also pin per-cell via shortcode attrs // `desc_1`, `desc_2`, `desc_3` (matching demo's "Up to 50% Off Bestsellers"). $desc = static function ($collection, $attrName, $shortcode) { $attr = trim((string) ($shortcode->{$attrName} ?? '')); if ($attr !== '') { return $attr; } return trim((string) ($collection->description ?? '')) ?: __('Up to 50% Off Bestsellers'); }; $btnText = trim((string) ($shortcode->button_text ?? __('Shop Now'))); // Optional per-cell title override (HTML allowed) — admins can pin per-cell titles to match // demo wording like "Jacquard Bucket
Bag With Logo" via shortcode attrs `title_1/2/3`. // Falls back to collection name when empty. $title = static function ($collection, string $attrName, $shortcode): string { $attr = trim((string) ($shortcode->{$attrName} ?? '')); if ($attr !== '') { return $attr; } return (string) ($collection->name ?? ''); }; @endphp @if ($left) @endif