CoolCMS API

CategoryTrailTrait

Table of Contents

Constants

LIST_PAGE_SLUG  : mixed = \App\Core\Routers\PageId::ESHOP_PRODUCT_LIST
Fixed id of the front list page (`Front:Eshop ProductSet::list`); the same constant is used by {@see \App\UI\Front\Eshop\Components\ProductCategoryListComponent\ProductCategoryList}.

Methods

buildCategoryTrail()  : array<string|int, BreadcrumbItemDTO>
Builds the trail of a category from the nested set (`lft`/`rgt`), root to current.
buildCategoryUrl()  : string|null
Returns the list URL of a category.

Constants

LIST_PAGE_SLUG

Fixed id of the front list page (`Front:Eshop ProductSet::list`); the same constant is used by {@see \App\UI\Front\Eshop\Components\ProductCategoryListComponent\ProductCategoryList}.

private mixed LIST_PAGE_SLUG = \App\Core\Routers\PageId::ESHOP_PRODUCT_LIST

Methods

buildCategoryUrl()

Returns the list URL of a category.

protected buildCategoryUrl(ProductCategory $category) : string|null

page and order are sent explicitly (the mask defaults 1 and 0, as in the sidebar tree); without them Nette fails on the optional p-<page>o-<order> segment with "Invalid link: Missing parameter". order = 0 is the "no sort chosen" sentinel, so the link does not preselect a manual sort order.

Parameters
$category : ProductCategory
Return values
string|null
On this page

Search results