Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-03-26 10:42:39

mrjysta
Member
Registered: 2008-09-22
Posts: 89

Split an articles content between 2 columns

Hmm,

I think the secondary_col content will have to be done using a form instead. Anyone have any other suggestions?

My layout is already created so my first idea of doing this by adding a div class=“primary_col” and div class=“secondary_col” into the body field of the article is a no no.
The secondary content is too large to be applied with a custom field me-thinks/

Offline

#2 2009-03-26 11:39:08

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 5,000
Website GitHub

Re: Split an articles content between 2 columns

Take a look at jcb_columnize – it allows you to define a breakpoint in your body article where the content is split into divs and you have some control over how they are named too.


TXP Builders – finely-crafted code, design and txp

Offline

#3 2009-03-26 13:01:36

mrjysta
Member
Registered: 2008-09-22
Posts: 89

Re: Split an articles content between 2 columns

nice, thanks Jakob/

Offline

#4 2010-03-19 09:41:59

mrjysta
Member
Registered: 2008-09-22
Posts: 89

Re: Split an articles content between 2 columns

Can’t seem to get jcb_columnize to work. The txt file when copied and pasted into the plug-in box says it’s incorrectly formatted!!! :-/ Is this now something that is built into the latest version so is no longer supplied as a plug-in? Can someone help me out? Im still needing to split the contents of my <txp:body /> into two different divs (<div class=“main-col”> and <div class=“side-col”>) Have tried adding these div’s directly into the article but it will get wrapped in <p> tags.

Offline

#5 2010-03-19 10:13:42

Zanza
Plugin Author
Registered: 2005-08-18
Posts: 699
Website

Re: Split an articles content between 2 columns

Put this in your article form:

<div class=“main-col”>
<txp:body/>
</div>

then, in the article, where you want to split, put this:

...bla bla your text bla bla. Here your main column text ends... bla bla.

 </div><div class="side-col">

Here you start your side column text. Bla bla bla...

That should work. Mind the space before </div>.

Offline

#6 2010-03-19 11:32:22

mrjysta
Member
Registered: 2008-09-22
Posts: 89

Re: Split an articles content between 2 columns

Ah! it’s the space that must have caught me out earlier with the <p> wrapping itself around the div, thanks Zanza

Offline

#7 2010-10-13 11:20:12

lazyadmin
Member
From: Germany
Registered: 2009-08-08
Posts: 25
Website

Re: Split an articles content between 2 columns

I’m looking for a version of jcb_columnize with a documentation/help. In the old (official) thread, which is closed now, my search was pretty hopeless..

Offline

#8 2010-10-13 14:14:24

merz1
Member
From: Hamburg
Registered: 2006-05-04
Posts: 994
Website

Re: Split an articles content between 2 columns

There is an article on the net which explains automatic column division which I can’t find at the moment :(


Get all online mentions of Textpattern via OPML subscription: TXP Info Sources: Textpattern RSS feeds as dynamic OPML

Offline

Board footer

Powered by FluxBB