[TYPO3-english] Adding content columns + grid view

Katja Lampela katja.lampela at lieska.net
Thu Apr 7 15:14:35 CEST 2011


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
> }
> }
> }
> }
> }
>
>
>
>

-- 
With kind regards

Katja Lampela
*Lieska-tuotanto*
www.lieska.net



More information about the TYPO3-english mailing list