• 1.
    Config:
  • 2.
     
  • 3.
    <?php
  • 4.
     
  • 5.
    return array(
  • 6.
    	'label' => array(
  • 7.
    		'Inhaltsboxen',
  • 8.
    		'Erzeugt nebeneinander dargestellte Spalten mit Bild',
  • 9.
    	),
  • 10.
    	'types' => array('content'),
  • 11.
    	'standardFields' => array('cssID', 'columns'),
  • 12.
    	'fields' => array(
  • 13.
    			'headline' => array(
  • 14.
                	'inputType' => 'standardField',
  • 15.
    				'options' => array('h2', 'h3'),
  • 16.
    			),
  • 17.
     
  • 18.
     
  • 19.
    		'image' => array(
  • 20.
                'label' => array('Bild', ''),
  • 21.
                'multiple' => true,
  • 22.
                'elementLabel' => '%s. Bild',
  • 23.
    			'inputType' => 'list',
  • 24.
                'minItems' => 1,
  • 25.
                'maxItems' => 5,
  • 26.
                'fields' => array(
  • 27.
                    'image' => array(
  • 28.
                        'label' => array('Bild', ''),
  • 29.
            			'eval' => array(
  • 30.
            				'fieldType' => 'radio',
  • 31.
            				'filesOnly' => true,
  • 32.
            				'extensions' => 'jpg,jpeg,png,gif,svg',
  • 33.
            			),
  • 34.
                        'inputType' => 'fileTree',
  • 35.
                    ),
  • 36.
    				'size' => array(
  • 37.
    				    'label' => array('Bildbreite und Bildhöhe', ''),
  • 38.
    				    'inputType' => 'imageSize',
  • 39.
    				    'options' => \System::getImageSizes(),
  • 40.
    				    'reference' => &$GLOBALS['TL_LANG']['MSC'],
  • 41.
    				    'eval' => array(
  • 42.
    				        'rgxp' => 'digit',
  • 43.
    				        'includeBlankOption' => true,
  • 44.
    				    ),
  • 45.
    				),
  • 46.
                    'imagetitle' => array(
  • 47.
                        'label' => array('Bild-Title', ''),
  • 48.
                        'eval' => array(),
  • 49.
                        'inputType' => 'text',
  • 50.
                    ),
  • 51.
                ),
  • 52.
            ),
  • 53.
     
  • 54.
    			'size' => array(
  • 55.
    			'label' => array('Bildbreite und Bildhöhe', ''),
  • 56.
    			'inputType' => 'imageSize',
  • 57.
    			'options' => \System::getImageSizes(),
  • 58.
    			'reference' => &$GLOBALS['TL_LANG']['MSC'],
  • 59.
    			'eval' => array(
  • 60.
    				'rgxp' => 'digit',
  • 61.
    				'includeBlankOption' => true,
  • 62.
    			),
  • 63.
    		),
  • 64.
    ...
  • 65.
     
  • 66.
    Markup: 
  • 67.
     
  • 68.
                       <?php foreach ($this->image as $image): ?>
  • 69.
                                <?php if ($image = $this->getImageObject($image->image, $this->size)): ?>
  • 70.
                                    <?php $this->insert('picture_default', $image->picture) ?>
  • 71.
                                <?php endif ?>
  • 72.
                        <?php endforeach ?>
  • 73.
     
  • 74.
    		
Config: <?php return array( 'label' => array( 'Inhaltsboxen', 'Erzeugt nebeneinander dargestellte Spalten mit Bild', ), 'types' => array('content'), 'standardFields' => array('cssID', 'columns'), 'fields' => array( 'headline' => array( 'inputType' => 'standardField', 'options' => array('h2', 'h3'), ), 'image' => array( 'label' => array('Bild', ''), 'multiple' => true, 'elementLabel' => '%s. Bild', 'inputType' => 'list', 'minItems' => 1, 'maxItems' => 5, 'fields' => array( 'image' => array( 'label' => array('Bild', ''), 'eval' => array( 'fieldType' => 'radio', 'filesOnly' => true, 'extensions' => 'jpg,jpeg,png,gif,svg', ), 'inputType' => 'fileTree', ), 'size' => array( 'label' => array('Bildbreite und Bildhöhe', ''), 'inputType' => 'imageSize', 'options' => \System::getImageSizes(), 'reference' => &$GLOBALS['TL_LANG']['MSC'], 'eval' => array( 'rgxp' => 'digit', 'includeBlankOption' => true, ), ), 'imagetitle' => array( 'label' => array('Bild-Title', ''), 'eval' => array(), 'inputType' => 'text', ), ), ), 'size' => array( 'label' => array('Bildbreite und Bildhöhe', ''), 'inputType' => 'imageSize', 'options' => \System::getImageSizes(), 'reference' => &$GLOBALS['TL_LANG']['MSC'], 'eval' => array( 'rgxp' => 'digit', 'includeBlankOption' => true, ), ), ... Markup: <?php foreach ($this->image as $image): ?> <?php if ($image = $this->getImageObject($image->image, $this->size)): ?> <?php $this->insert('picture_default', $image->picture) ?> <?php endif ?> <?php endforeach ?>

Copy Code to Clipboard Raw

Sign-in or Create a Free Account.

Snippi uses Twitter or Facebook to register and create accounts. Registration will enable you to keep track of your snippets. We never spam your timeline or wall. Ever.

Sign-in with Facebook Sign-in with Twitter