Hi
I'm stuck on some code relating to a global php file. I have created a file called global-testimonials.php and want to display the testimonials on multiple pages so thought it would be better to create a global page I can use on multiple pages, weird thing is it was working then it's stopped working and not displaying the testimonials
Below is the code from global-testimonials.php
Below is the code from a page where I want the testimonials to display
Can anyone see what I have done wrong please as I can't see any mistake
I'm stuck on some code relating to a global php file. I have created a file called global-testimonials.php and want to display the testimonials on multiple pages so thought it would be better to create a global page I can use on multiple pages, weird thing is it was working then it's stopped working and not displaying the testimonials
Below is the code from global-testimonials.php
- Code: Select all
<?php require_once( 'cms/cms.php' ); ?> <cms:template title='Global Testimonials (On All Pages)' executable='0' order='12'> <cms:editable name='testimonials_group' label='Testimonials Section' type='group' collapsed='1' order='1' /> <cms:editable type='text' name='testimonials_header' label='Testimonials Header' group='testimonials_group' /> <cms:editable type='text' name='testimonials_text' label='Testimonials Text' group='testimonials_group' /> <cms:repeatable name='testimonials' label='Testimonials' stacked_layout='1' group='testimonials_group'> <cms:editable type='richtext' toolbar='full' name='review_text' label='Review Text' /> <cms:editable type='text' name='testimonial_name' label='Name of person who left review' /> </cms:repeatable> </cms:template> <?php COUCH::invoke(); ?>
Below is the code from a page where I want the testimonials to display
- Code: Select all
<section class="testimonial-section" style="background-image: url(assets/images/background/client-reviews-bg.jpg)"> <div class="auto-container"> <div class="sec-title light centered"> <div class="icon"> <img src="assets/images/icons/separater.png" alt="" /> </div> <h2><cms:embed code="<cms:get_custom_field 'testimonials_header' masterpage='global-testimonials.php' />" /></h2> <div class="text"> <cms:embed code="<cms:get_custom_field 'testimonials_text' masterpage='global-testimonials.php' />" /> </div> </div> <div class="inner-container"> <div class="testimonial-carousel owl-carousel owl-theme"> <cms:pages masterpage='global-testimonials.php' limit='1'> <cms:show_repeatable 'testimonials' > <div class="testimonial-block"> <div class="inner-box"> <div class="text"> <cms:show review_text/> </div> <div class="author-box"> <div class="author-inner"> <h6><cms:show testimonial_name/></h6> <div class="rating"> <span class="fa fa-star"></span> <span class="fa fa-star"></span> <span class="fa fa-star"></span> <span class="fa fa-star"></span> <span class="fa fa-star"></span> </div> </div> </div> </div> </div> </cms:show_repeatable> </cms:pages> </div> </div> </div> </section>
Can anyone see what I have done wrong please as I can't see any mistake