Search

I've inherited a design from someone and have just noticed that some of the articles have a 2 column layout where the actual body copy of the entry is presented over 2 columns(magazine style).

Is there a means to achieve a split of the content so it presents itself over 2 columns?

There's no hard and fast rule with this one. The easy way would be to look at splitting the content based on some kind of marker that is present in the body, i.e. <split/>. However, this requires the site's author to add the markup in their entry.

The alternative is calculate the total number of words in the body, the try to cut it around the middle. You can use a HTML truncate utility to help cut the body into two parts.

One other alternative is to look at doing this dynamically through javascript.

Nice one Stephen.

The other is to just use CSS3 with the column-count rules. You do lose a bit of control about when you want a column break to occur though.

Thanks gents! content will be purely text so might try one of Stephens methods first!

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details