#

Hero Slider
Create stunning hero sliders that captivate visitors and showcase your most important content.
Customize each slide with images, text, buttons, and links to match your brand perfectly. Manage multiple slides effortlessly and keep your homepage content fresh and engaging.
#
Prerequisites
- Have a Solodev CMS.
- Have a Website.
- Have a Slider Plugin. Like Slick, Flexslider, or Bootstrap Carousel.
Note:
We use Bootstrap 5 in our packages. You can update your code to match your own framework, styles, or preferences as needed.
#
Step-by-Step Setup Guide
These steps will guide you through the process of installing the Hero Slider Module and getting it live on your page.
- Navigate to Modules
- In your CMS dashboard, click Modules in the left navigation menu
- Click the Add Module button
- Give your hero slider module a name
- Select from the three options:
- Datatable: Creates a simple data table structure
- Module: Builds a custom module from scratch
- Package: Installs a pre-built module from a zip file
- For the purpose of this tutorial, select Package: and use this zip file .
- Click Submit.
Note:
The module includes pre-built slides that you can personalize by editing the module content.
- Navigate to
Websites > example.com > web files > content
- Create a folder called
hero
- In the hero folder, create a new code file named
hero-slider.tpl
- Add the hero code using the example template provided below.
<div class="hero position-relative">
[repeater id="" display_type="news" limit="0,3"]
<div style="background: url([get_asset_file_url id={{slider_image}}]); background-repeat: no-repeat;" class="d-flex align-items-center"
[is_set value="slider_image_alt_tag"]
title="{{slider_image_alt_tag}}"
[/is_set]
[is_empty value="slider_image_alt_tag"]
title="{{event_title}}"
[/is_empty]
>
<div class="container px-sm-0 px-7">
<div class="row">
<div class="col-lg-9 col-xl-8 col-xxl-6">
<p class="h1">{{event_title}}</p>
<p class="mt-3 d-none d-sm-flex">{{slider_intro}}</p>
<div class="d-inline-flex v-align-middle fs-5 mt-sm-2 mt-3 flex-md-row flex-column">
[cond type="is_not" subject="{{slider_link_external}}" value="0"]
<a href="{{slider_link}}" class="btn btn-lg btn-secondary d-flex align-items-center justify-content-center fw-semibold text-white" target="_blank" rel="noopener noreferrer"></span>{{slider_button_text}}</a>
[/cond]
[cond type="is" subject="{{slider_link_external}}" value="0"]
<a href="{{slider_link}}" class="btn btn-lg btn-secondary d-flex align-items-center justify-content-center fw-semibold text-white"></span>{{slider_button_text}}</a>
[/cond]
</div>
</div>
</div>
</div>
</div>
[/repeater]
</div>
Important!
You need to add the ID number of your hero slider module to the repeater shortcode within the id=""
attribute.
Click Publish.
Open your homepage
index.stml
or the desired page where you want to add the hero slider.Insert your hero-slider file into the page.
Click Publish.
Go to your website and refresh the page to see your hero slider in action.
#
Support
Support for Hero Slider Module is handled directly through Solodev's global help desk. For more information regarding support queries, go to www.solodev.com.
Note:
To learn more about shortcodes and how they work, visit our shortcodes documentation.