What I would like to do is enter content in a Rich Text Editor and have it displayed in 2 columns.
I would like to create a macro that counts the no. of paragraphs and divides by 2. Then if there are 8 paragraphs it display the first 4 in the left column and the next 4 in the right column. Or if 7 paragraphs the first 4 left then 3 in the right?
Is this actually possible or would I have to create 2 Text Editors, one for each column? Or split into two columns after set number of characters or words?
Any ideas, better suggestions or solutions would be very appreciated.
Alternatelty, you could use some jquery to count up the paragraphs and apply different classes to the paragraphs in the first half and the second half.
2 column layout based on number of paragraph tags
Hi,
What I would like to do is enter content in a Rich Text Editor and have it displayed in 2 columns.
I would like to create a macro that counts the no. of paragraphs and divides by 2. Then if there are 8 paragraphs it display the first 4 in the left column and the next 4 in the right column. Or if 7 paragraphs the first 4 left then 3 in the right?
Is this actually possible or would I have to create 2 Text Editors, one for each column? Or split into two columns after set number of characters or words?
Any ideas, better suggestions or solutions would be very appreciated.
Thank you
Hi Andrew
As I see it the best way forward is to either create two rich text editors - one for each column or perhaps look into enabling the template plugin for tinymce as described in this wiki entry: http://our.umbraco.org/wiki/how-tos/enabling-the-%27template%27-plugin-for-tinymce
Hope this helps.
/Jan
If you're happy with the graceful degradation involved, you could simply use the css3 column-count attribute (http://www.quirksmode.org/css/multicolumn.html etc).
Alternatelty, you could use some jquery to count up the paragraphs and apply different classes to the paragraphs in the first half and the second half.
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.