CoolCMS API

MetaDataTrait

Meta data of the catalog; same as `Front\Bazaar\...\Inits\MetaDataTrait`.

IMPORTANT: meta is not written into the template through {define metaTitle}: the layout renders the $metaData DTO that the presenter fills.

IMPORTANT: ProductSetText has no meta fields of its own (getMetaTitle(), getMetaDescription(), getMetaKeywords() do not exist on it, unlike Category / Advert texts), so the detail composes meta from the set name and description. Do not bring back {define metaTitle}{$translation?->getMetaTitle()}{/define} blocks: the first call from the layout would crash the page with "Call to undefined method" (?-> protects only against null, not against a missing method).

Table of Contents

Methods

prepareMetaDataForDetail()  : void

Methods

prepareMetaDataForDetail()

private prepareMetaDataForDetail(ProductSet|null $set, int|null $languageId) : void
Parameters
$set : ProductSet|null
$languageId : int|null
On this page

Search results