Ad Units
Add an image/text advert to your homepage which is great for pushing important aspects of the site.
Wireframe
Preparation Checklist
Before you start this tweak, it's a good idea to run through our preparation checklist below:
- Read through the Getting Started to get a better sense of how the Control Panel, Database and Front End store interact.
- Learn our recommended Simple Workflow. This makes the implementation process as easy as possible.
- Create a new Staging Theme for this tweak. This allows you to preview any changes before they are visible to live customers.
Coding Instructions
Step 1: Setup the ad group
To add an advert to the homepage you will first need to create an advert group.
- In the control panel, go to
Setup & tools > All settings & tools > Webstore Advertising Groups
. - Setup a new advert group named
ad_units
.
Step 2: Create the adverts
Create an advert and set the "Group" to ad_units
and "Select location for ad to appear" to "Home".
Step 3: Add the homepage code
Open /httpdocs/assets/themes/[THEME-NAME]/templates/cms/home.template.html
and paste the following code into the template where you would like it to appear.
[%advert type:'text' template:'text' limit:'10' ad_group:'ad_units'%]
[%param *header%]
<div class="row">
[%/param%]
[%param *footer%]
</div>
[%/param%]
[%/advert%]
Final Result
Customising this section
More information on how to customise this section can be found within the Advert Documentation.