Forum for discussing general topics related to Couch.
2 posts Page 1 of 1
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' />
on the home page where I want it to appear and it's outputting it as it should but it's outputting the text as well about the banner, have I done the code wrong in the snippet file? I have attached a screen shot of the issue.

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>

Attachments

UPDATE: I solved it using the following code on the front end and just amended it to suit

Code: Select all
<cms:pages masterpage='here-put-template-with-editable.php' limit='1'>
   <cms:show_repeatable 'my_repeatable'>
      <cms:show my_image />
   </cms:show_repeatable>
</cms:pages>


In the editable php file, I called it global-cta.php for example and put the editable fields in that so I can edit the fields in the admin side
2 posts Page 1 of 1
cron