[TYPO3] 2-Column page content

Jo Schneider typo3listmember at typo3cms.info
Wed Feb 8 15:50:19 CET 2006


rocky wrote:

>Hey,
>
>I used the code listed below to to creat 2 column page.Which will show 2 
>column if there's content in Right column, otherwise only on column is 
>shown. But the code made the normal column cotent override by the right 
>column under page module. No matter what only one column is shown on my 
>page.
>
>Below is my code
>####begin######
>#left content
>temp.content<styles.content.get
>temp.content.stdWrap.wrap=<div id="content">|</div>
>##right cotent##
>temp.right<styles.content.getRight
>temp.right.stdWrap.required=1
>temp.right.stdWrap.innerWrap=<div id="right"><div 
>id="content_right">|</div></div>
>#place the left content as cObject before the right content
>temp.right.stdWrap.preCObject < styles.content.get
>temp.right.stdWrap.preCObject.wrap=<div id="content_left">|</div>
>temp.content.stdWrap.override.cObject<temp.right
>####end#############
>
>In the main template the code is
>########
>page{
>....
>70<temp.content
>....
>}
>###########
>I've worked on this for hours. I think the stdWrap.preCObject is not 
>quite right. If you could give me some hint that will be great!
>
>Thanks in advance!
>Rocky
>
HI! I do not think you need preCObject. Just try this:

temp.content = COA
temp.content {
    10 < styles.content.get
    10.required=1
    10.wrap = <div id="content">|</div>
}

temp.contentRight = COA
temp.contentRight {
   10 < styles.content.getRight
   10.required=1
   10.wrap = <div id="right"><div id="content_right">|</div></div>
}

page {
    10 < temp.content
    20 < temp.contentRight
}


Best wishes!
Jo






More information about the TYPO3-english mailing list