I want to display a global call to action banner my website and have it displayed on multiple pages and so I only want to edit the text once instead of multiple times so I created a snippet with the following code and called the file global-cta.html and uploaded it to the snippets folder and then used the tag
- Code: Select all
<cms:embed 'global-cta.html' />
- Code: Select all
<cms:editable name='call_group' label='Call to Action Banner (Green Banner) Section' type='group' collapsed='1' order='6' />
<cms:editable type='text' name='call_text' label='Banner Text' group='call_group' />
<cms:editable type='text' name='cta_phone_number_link' label='Phone Number Link' group='call_group' />
<cms:editable type='text' name='cta_phone_number_text' label='Phone Number' group='call_group' />
<cms:editable type='text' name='cta_button_link' label='button link' group='call_group' />
<cms:editable type='text' name='cta_button_text' label='button text' group='call_group' />
<section class="call-to-action-section">
<div class="auto-container">
<div class="row clearfix">
<div class="title-column col-lg-8 col-md-12 col-sm-12">
<div class="inner-column">
<div class="phone flaticon-call-3"></div>
<div class="text">
<span><cms:show call_text/></span>
<br>
<span><a href="tel:<cms:show cta_phone_number_link/>" class="text-white"><cms:show cta_phone_number_text/></a></span>
</div>
</div>
</div>
<div class="button-column col-lg-4 col-md-12 col-sm-12">
<div class="inner-column">
<a href="<cms:show cta_button_link/>" class="theme-btn btn-style-two"><span class="txt"><i class="flaticon-shield-1"></i> <cms:show cta_button_text/></span></a>
</div>
</div>
</div>
</div>
</section>