Splitting paragraph?

8 posts by 5 authors in: Forums > CMS Builder
Last Post: August 11, 2013   (RSS)

By mbareara - August 4, 2013

Hi

Is it possible to split paragraph in Cms Builder?

I would insert google adsense box between 3 and 4 paragraph.

Thank you for your help

Orazio

By gregThomas - August 5, 2013

Hi Orazio,

Jerry suggestion seems like the best solution. You could also have two separate WYSIWYG fields in your section, one for text that appears above the advert and a second box for text that appears below it. If these fields were called Top Text and Bottom Text, you could display them like this:

<?php echo $record['top_text']; ?>
<!-- adsense code goes here -->
<?php echo $record['bottom_text']; ?>

Let me know if you have any questions.

Thanks!

Greg

Greg Thomas







PHP Programmer - interactivetools.com

By Toledoh - August 5, 2013

It may take some figuring out, but maybe you could also use p:nth-child(4):before{ content"**placeholder**";} to enter something before the 4th paragraph.  Then, maybe something like http://www.benalman.com/projects/jquery-replacetext-plugin/ could then replace the placeholder?

Cheers,

Tim (toledoh.com.au)

By Codee - August 8, 2013

Tim, does that work in IE, pre version 9/10?

By Toledoh - August 8, 2013

Not sure. May need modernizr or something similar?

Cheers,

Tim (toledoh.com.au)

By Codee - August 8, 2013

Ok, thanks.

By Toledoh - August 11, 2013

Hey Equinox,

I found this... may help?

For non-IE6 browsers, you can use the adjacent sibling selector, if the type of child elements are always the same. For example, if you want select the 5th child li element in a list:

ul:first-child > li+li+li+li+li { ... }

Cheers,

Tim (toledoh.com.au)