[TYPO3-english] Adding content columns + grid view

Sergey Alexandrov serg at alexandrov.us
Thu Apr 7 15:57:03 CEST 2011


Well, if this is for adding banners only, I wouldn't do this at all. All 
you need to do is to define banners in template setup (for example)

temp.topbanners<plugin.tx_macinabanners_pi1
temp.topbanners{
placement=top
mode=random
results_at_a_time=3
pidList=PID_LIST_OF_BANNERS_FOLDER
image.file.maxW=170
templateFile=uploads/tf/banner_template.html
}

Then create top/bottom banners in the folder and define banner placements

Add marks into your template

page.10.marks.TOPBAN < temp.topbanners
page.10.marks.BOTBAN < temp.topbanners
page.10.marks.BOTBAN.placement=bottom

No need to create additional columns (in this case, of course)

To add more 'virtual' column you can try to use jfmulticontent extension 
as well

Best wishes, have fun!

On 4/7/2011 9:14 AM, Katja Lampela wrote:
> My main concern is the step 1, is it necessary at all?
> Thanks,
> Katja
>
> 7.4.2011 16:12, Katja Lampela kirjoitti:
>> Hi,
>>
>> I'm trying to make a nice how-to-do of making more content columns in 
>> addition to the default four (0=normal, 1=left, 2=right, 3=border). 
>> And with this the great new grid view of course.
>>
>> I would much appreciate any feedback if all these steps are necessary 
>> or if there is some extra/errourness code.
>>
>> Here is an example of adding 2 more columns (4=topbanner, 
>> 5=bottombanner)
>>
>> The steps are
>> 1. add/define the columns in typo3conf/extTables.php.
>> 2. add/define the columns in template setup
>> 3. define backend layout
>>
>>
>> *STEP 1 example:*
>>
>> t3lib_extMgm::addPageTSConfig('
>> mod.SHARED.colPos_list = 0,1,2,3,4,5
>> ');
>>
>> $TCA["tt_content"]["columns"]["colPos"]["config"]["items"] = array (
>> "0" => array ("NORMAL||||||||||","0"),
>> "1" => array ("LEFT||||||||||","1"),
>> "2" => array ("RIGHT||Unten Links||||||||","2"),
>> "3" => array ("BORDER||Rechts||||||||","3"),
>> "4" => array ("TOPBANNER||Rechts||||||||","4"),
>> "5" => array ("BOTTOMBANNER||Rechts||||||||","5"),
>> );
>>
>>
>> *STEP 2 example:*
>>
>> temp.addcol4 = CONTENT
>> temp.addcol4 {
>> table = tt_content
>> select {
>> pidInList = this
>> orderBy = sorting
>> where = colPos = 4
>> languageField = sys_language_uid
>> }
>> }
>> temp.addcol5 = CONTENT
>> temp.addcol5 {
>> table = tt_content
>> select {
>> pidInList = this
>> orderBy = sorting
>> where = colPos = 5
>> languageField = sys_language_uid
>> }
>> }
>>
>> page.10 {
>> marks.colAla < temp.addcol4
>> marks.colAla < temp.addcol5
>> }
>>
>>
>> *STEP 3 example:*
>>
>> - Create a Backend Layout record with desired layout, which results 
>> for example:
>> backend_layout {
>>
>> colCount = 5
>> rowCount = 3
>> rows {
>> 1 {
>> columns {
>> 1 {
>> name = Bottombanner
>> colPos = 4
>> colspan = 4
>> }
>> }
>> }
>> 2 {
>> columns {
>> 1 {
>> name = Left
>> colPos = 1
>> }
>> 2 {
>> name = Normal
>> colPos = 0
>> }
>> 3 {
>> name = Border
>> colPos = 3
>> }
>> 4 {
>> name = Right
>> colPos = 2
>> }
>> }
>> }
>> 3 {
>> columns {
>> 1 {
>> name = Bottombanner
>> colPos = 5
>> colspan = 4
>> }
>> }
>> }
>> }
>> }
>>
>>
>>
>>
>


More information about the TYPO3-english mailing list