All Collections
Magento 2.x Integration
Zones
Magento 2.x - Adding Zones using HTML
Magento 2.x - Adding Zones using HTML

How to add Zones using html in templates

Peter Brooksbank avatar
Written by Peter Brooksbank
Updated over a week ago

If you cannot place a Zone exactly where you want using standard widgets, then you can also add them using html tags directly in existing theme templates.

Depending on your display mode, the html needs to be slightly different. See the "Magento 2.x - Configuration - Mode" article for more information on display modes.

Client-side

If PureClarity is in "Client-side" mode, the html needs to be:

<div data-pureclarity="bmz:ZONE-ID;"></div>

Serverside

If PureClarity is in "Serverside" mode, the html needs to be:

<div data-serverside-pureclarity="bmz:ZONE-ID" data-pureclarity-bmz-id="ZONE-ID" class="pc_bmz" />

Zone ID

In both of the above examples, replace ZONE-ID with the PureClarity Zone id you wish to place there (e.g. HP-01) and this will be picked up by our script and the recommender will be inserted where you've place the HTML.

Did this answer your question?