Add a banner carousel to your homepage to promote certain areas of your business.
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.
By default, this code is included in Skeletal Theme, but if you have a custom design it may have been removed.
Step 1: Open the homepage template
The homepage template can be found here
Step 2: Add the code into template
Paste the following code into the template where you would like the element to appear.
[%advert type:'text' template:'carousel' limit:'10' ad_group:''%] [%param *header%] <section id="homepageCarousel" class="carousel slide" data-ride="carousel" aria-label="Banner images"> [%if [@total_showing@] > 1%] <ol class="carousel-indicators"> [%site_value id:'counter' type:'load'/%] </ol> [%/if%] <div class="carousel-inner"> [%/param%] [%param *footer%] </div> [%if [@total_showing@] > 1%] <a class="carousel-control-prev" href="#homepageCarousel" role="button" data-slide="prev"> <span class="carousel-control-prev-icon" aria-hidden="true"></span> <span class="sr-only">Previous</span> </a> <a class="carousel-control-next" href="#homepageCarousel" role="button" data-slide="next"> <span class="carousel-control-next-icon" aria-hidden="true"></span> <span class="sr-only">Next</span> </a> [%/if%] </section> [%/param%] [%param *ifempty%] <a class="neto-placeholder neto-placeholder-rotator btn-loads" data-loading-text="<i class='fa fa-spinner fa-spin' style='font-size: 14px'></i>" href="[@config:home_url@]/_cpanel?item=adw&page=view&id=New&plan_id=1"> Click to add a banner<br/> </a> [%/param%] [%/advert%]
Note: This advert code uses an empty advert group, which means that all adverts which aren't assigned to a specific advert group will show. It also uses the carousel template, so that if multiple adverts are uploaded, they'll scroll through.
Customising this section
More information on how to customise this section can be found within the Advert Documentation.