How is a widget rendered on a CMS page?









$construction looks like this:




$value looks like this:

type="Magento\CatalogWidget\Block\Product\ProductsList" products_count="10" template="product/widget/content/grid.phtml" conditions_encoded="a:2:[i:1;a:4:[s:4:`type`;s:50:`Magento|CatalogWidget|Model|Rule|Condition|Combine`;s:10:`aggregator`;s:3:`all`;s:5:`value`;s:1:`1`;s:9:`new_child`;s:0:``;]s:4:`1--1`;a:4:[s:4:`type`;s:50:`Magento|CatalogWidget|Model|Rule|Condition|Product`;s:9:`attribute`;s:12:`category_ids`;s:8:`operator`;s:2:`==`;s:5:`value`;s:1:`3`;]]"

$params (the function’s result) looks like this:


$type may be Magento\CatalogWidget\Block\Product\ProductsList








$data looks like this:

An example of a widget definition:


$widget could be:



See a continuation here: How is a product collection widget rendered on a CMS page

See also: