Results 1 to 7 of 7

Thread: DCA field "radioTable"

  1. #1
    User
    Join Date
    06-19-09.
    Location
    Elbl?g, Poland
    Posts
    152

    Default DCA field "radioTable"

    Hi,

    Do you know where I can see any example of DCA "radioTable" field? Maybe in core files or in some custom module?
    Marcin

    http://www.contao.pl - Polish Support Site
    http://forum.contao.pl - Polish Contao community forum


    -----------------------
    Need custom template? Feel free to contact me by e-mail marcin@contao.pl

  2. #2
    Experienced user
    Join Date
    06-20-09.
    Posts
    1,311

    Default Re: DCA field "radioTable"

    mapTypeControlPos in dca/tl_dlh_googlemaps.php of the dlh_googlemaps module[attachment=0:1h4at0vh]radioTable.jpg[/attachment:1h4at0vh]

  3. #3
    User
    Join Date
    06-19-09.
    Location
    Elbl?g, Poland
    Posts
    152

    Default Re: DCA field "radioTable"

    Thanks ramjet.

    At the http://www.contao.org/reference.html page there is description of radioTable:
    "radioTable - Table with images and radio buttons"
    With images? How?

    I found piece of code in /system/modules/backend/dca/tl_layout.php (line 177) - the 'cols' field
    Code:
    'cols' => array
    (
    	'label'                   => &$GLOBALS['TL_LANG']['tl_layout']['cols'],
    	'default'                 => '2cll',
    	'exclude'                 => true,
    	'inputType'               => 'radioTable',
    	'options'                 => array('1cl', '2cll', '2clr', '3cl'),
    	'eval'                    => array('helpwizard'=>true, 'cols'=>4, 'submitOnChange'=>true),
    	'reference'               => &$GLOBALS['TL_LANG']['tl_layout']
    ),


    but I still don't know where is something related to images. I can't find this.
    Marcin

    http://www.contao.pl - Polish Support Site
    http://forum.contao.pl - Polish Contao community forum


    -----------------------
    Need custom template? Feel free to contact me by e-mail marcin@contao.pl

  4. #4
    User
    Join Date
    07-26-09.
    Posts
    175

    Default Re: DCA field "radioTable"

    Maybe CSS or reference ($GLOBALS['TL_LANG']['tl_layout']

  5. #5
    User
    Join Date
    06-19-09.
    Location
    Elbl?g, Poland
    Posts
    152

    Default Re: DCA field "radioTable"

    Quote Originally Posted by Tru
    Maybe CSS or reference ($GLOBALS['TL_LANG']['tl_layout']
    No. Becouse in source code of Layout page is:
    Code:
    [...]
    <td>
      <input type="radio" onclick="Backend.autoSubmit('tl_layout');" onfocus="Backend.getScrollOffset();" value="2clr" class="tl_radio" id="cols_0_2" name="cols">
      <label for="cols_0_2">
         [img]system/themes/default/images/2clr.gif[/img]
      </label>
    </td>
    [...]
    So, instead text label there is img html tag so it can't be set via css
    Marcin

    http://www.contao.pl - Polish Support Site
    http://forum.contao.pl - Polish Contao community forum


    -----------------------
    Need custom template? Feel free to contact me by e-mail marcin@contao.pl

  6. #6
    User
    Join Date
    06-19-09.
    Location
    Elbl?g, Poland
    Posts
    152

    Default Re: DCA field "radioTable"

    I think I know how it works. If you set in DCA
    Code:
    'options' => array('1cl', '2cll', '2clr', '3cl'),
    and if you have in system/themes/default/images/ gifs with names like options names (1cl.gif, 2cll.gif, 2clr.gif, 3cl.gif) these gifs will be your labels. Otherwise, the label will be empty.
    Marcin

    http://www.contao.pl - Polish Support Site
    http://forum.contao.pl - Polish Contao community forum


    -----------------------
    Need custom template? Feel free to contact me by e-mail marcin@contao.pl

  7. #7
    Experienced user
    Join Date
    06-20-09.
    Posts
    1,311

    Default Re: DCA field "radioTable"

    in the dlh_googlemaps module html folder is be_styles.css where Christian seems to be setting the table colours in the image i posted.... and he ads it in config.php
    Code:
    $GLOBALS['BE_MOD']['content']['dlh_googlemaps'] = array
    (
    	'tables' => array('tl_dlh_googlemaps', 'tl_dlh_googlemaps_elements'),
    	'stylesheet'   => 'system/modules/dlh_googlemaps/html/be_styles.css',
    	'icon'   => 'system/modules/dlh_googlemaps/html/icon.gif',
    );
    and uses the eval to point to it,

    Code:
    'eval'                    => array('cols'=>3,'tl_class'=>'dlh_googlemaps_position')
    Code:
    .dlh_googlemaps_position #mapTypeControlPos_1_4, 
    .dlh_googlemaps_position #mapTypeControlPos_2_7, 
    .dlh_googlemaps_position #mapTypeControlPos_3_10, 
    .dlh_googlemaps_position #navigationControlPos_1_4, 
    .dlh_googlemaps_position #navigationControlPos_2_7, 
    .dlh_googlemaps_position #navigationControlPos_3_10, 
    .dlh_googlemaps_position #scaleControlPos_1_4, 
    .dlh_googlemaps_position #scaleControlPos_2_7, 
    .dlh_googlemaps_position #scaleControlPos_3_10 {
    	display:none;
    }
    .dlh_googlemaps_position #ctrl_mapTypeControlPos td, .dlh_googlemaps_position #ctrl_navigationControlPos td, .dlh_googlemaps_position #ctrl_scaleControlPos td {
    	border:1px solid #ffffff;
    	background-color: #99B3CC;
    	padding:5px 40px 5px 40px;
    }
    looks pretty complicated!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •