PageBuilder
Visual section builder for MODX 3. Draft and publish without overwriting resource content

Catalog navigation: child categories of a parent with thumbnail and link.
Информация
Requires PageBuilder Pro and miniShop3.
Parent category and Limit. Resources must be msCategory.
| Parameter | Value |
|---|---|
| key | categories_row |
| Layer | Pro |
| Category | commerce (commerce) |
| Chunk | pagebuilderpro_categories_row |
| Requires | pro, minishop3 |
Fill these fields in the section inspector. Field types are documented in the field types reference.
title) Type text. Optional.
parent) Type relation. Required. Pick one MODX resource in a search modal.
limit) Type number. Optional.
Horizontal pb-categories-row.
Example payload after save. Media, video, and map values may be enriched on output:
{
"title": "Section title",
"parent": 101,
"limit": 6
}Fenom chunk pagebuilderpro_categories_row:
{var $catalogParent = $parent.id|default:($parent_id|default:0)}
{var $listing = ''}
{if $catalogParent}
{var $listing = $modx->runSnippet('pdoResources', [
'parents' => $catalogParent,
'depth' => 1,
'limit' => $limit|default:8,
'where' => ['class_key' => 'MiniShop3\\Model\\msCategory'],
'tpl' => 'pagebuilderpro_ms3_category_row'
])}
{/if}
<section class="pb-section pb-section--categories-row pb-categories-row{if $cssClass} {$cssClass|escape}{/if}" data-pb-section="categories_row"{if $id} id="pb-{$id|escape}"{/if}>
<div class="pb-section__inner pb-categories-row__inner">
{if $title}
<h2 class="pb-heading">{$title|escape}</h2>
{/if}
{if $listing}
<div class="pb-categories-row__grid pb-grid">
{$listing}
</div>
{else}
<p class="pb-listing__empty">No subcategories in this category.</p>
{/if}
</div>
</section>PageBuilderPro/core/components/pagebuilderpro/sections/categories_row.json