[TYPO3] 2-Column page content

rocky rockyo at max-source.com
Thu Feb 9 10:22:23 CET 2006


Jo Schneider wrote:
> 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
> 
> 
> 
Thank you very much! I altered a little bit of your proposal below is my 
code and it works fine.
##########################
#left content
temp.content=COA
temp.content.wrap=<div id=content> | </div>
temp.content{
      10<styles.content.get
      10.wrap=<div id=content_left> |</div>
      30<styles.content.getRight
      30.wrap=<div id=content_right> |</div>
}
######################################

###########
page{
....
  70<temp.content
.....
}

#####

Rocky



More information about the TYPO3-english mailing list