Splitting a textarea over 2 columns using XSLT
This is an open discussion with 5 replies, filed under XSLT.
Search
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.
I seem to remember seeing a few methods:
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.
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?