[TYPO3-dev] Show other field in backend

Morten Hagh morten at hagh.dk
Tue Apr 19 09:26:10 CEST 2011


Hi list,

 

I am developing a small gallery extension. At first I create a gallery
record with navigation title, a more detailed title and then a description
and thereafter I create a photos record where I selecte X photos and the
gallery they belong to (parent gallery).

My only problem is in my backend where the photos records are displayed with
the uid of the parent gallery - what I want is for them to be shown with the
navigation title of the parent gallery for easier readabilty.

 

I have tx_proggallery_galleries and tx_projgallery_photos in the database.


Can someone tell me how to get tx_proggallery_galleries.navi_title to be
shown on my photos records (as now is show
tx_projgallery_photos.parent_gallery which is a UID). ?



Below is my TCA for the photos:

 

$TCA['tx_projgallery_photos'] = array (

                             'ctrl' =>
$TCA['tx_projgallery_photos']['ctrl'],

                             'interface' => array (

 
'showRecordFieldList' => 'hidden,photos,parent_gallery'

                             ),

                             'feInterface' =>
$TCA['tx_projgallery_photos']['feInterface'],

                             'columns' => array (

                                                          'hidden' => array
(                                                  

 
'exclude' => 1,

 
'label'   => 'LLL:EXT:lang/locallang_general.xml:LGL.hidden',

 
'config'  => array (

 
'type'    => 'check',

 
'default' => '0'

 
)

                                                          ),

                                                          'photos' => array
(                                                  

 
'exclude' => 0,                                                          

 
'label' =>
'LLL:EXT:projgallery/locallang_db.xml:tx_projgallery_photos.photos',


 
'config' => array (

 
'type' => 'group',

 
'internal_type' => 'file',

 
'allowed' => $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'],


 
'max_size' => $GLOBALS['TYPO3_CONF_VARS']['BE']['maxFileSize'],        

 
'uploadfolder' => 'uploads/tx_projgallery',

 
'size' => 10,      

 
'minitems' => 0,

 
'maxitems' => 25,

 
)

                                                          ),

                                                          'parent_gallery'
=> array (                                   

 
'exclude' => 0,                                                          

 
'label' =>
'LLL:EXT:projgallery/locallang_db.xml:tx_projgallery_photos.parent_gallery',


 
'config' => array (

 
'type' => 'group',                        

 
'internal_type' => 'db',            

 
'allowed' => 'tx_projgallery_gallery',

 
'size' => 1,        

 
'minitems' => 0,

 
'maxitems' => 1,

 
)

                                                          ),

                             ),

                             'types' => array (

                                                          '0' =>
array('showitem' => 'hidden;;1;;1-1-1, photos, parent_gallery')

                             ),

                             'palettes' => array (

                                                          '1' =>
array('showitem' => '')

                             )

);

/Morten Hagh





More information about the TYPO3-dev mailing list