Adding a closing DIV to existing Content block
Permalink
So I'm using the Content block to add text to a slider. The markup is:
I added this to the page:
I've tried various ways to add the closing div, but it doesn't show except outside of all of the added P tags. This is how it displays:
Any thoughts?
I added this to the page:
<div class="cs_slider testimonials"> <?php echo '<div class="cs_article">'; $a = new Area('testimonial'); $a->display($c); ?> </div><!-- End cs_slider -->
I've tried various ways to add the closing div, but it doesn't show except outside of all of the added P tags. This is how it displays:
<div class="cs_slider testimonials"> <div class="cs_article"><p>Lorem ipsum sit dolor amet etc...</p><p>Another testimonial...</p> </div><!-- End cs_slider -->
Any thoughts?
This will put the html around any block you add to this area in non-edit mode. In edit mode the area is output as normal. You'll need to adjust your template and slider to not function in edit mode, but after you make that adjustment the text can be either content blocks or image blocks or videos or whatever else your slider supports.
It hasn't worked for every slider I've tried but I have done several like this and it's worked well.