Weiß jemand wie man die EUF Grid Einstellungen in einem eigenen RSCE integrieren kann und wie man darauf im template zugreifen kann?
Danke
Weiß jemand wie man die EUF Grid Einstellungen in einem eigenen RSCE integrieren kann und wie man darauf im template zugreifen kann?
Danke
Geändert von Franko (16.06.2018 um 07:13 Uhr)
Freelancer, Digital Design Enthusiast, Contao Aficionado and Tutorial Junkie @MoinFranko - Carpe diem ...
Die euf_grid Extension müsste ihre Palettenänderungen per onload_callback machen. Siehe zB
https://github.com/Craffft/css-style...e/pull/6/files
https://github.com/Craffft/css-style...e/pull/7/files
Danke,
Aber versteh nur Bahnhof ... :-)
Sent from my iPad using Tapatalk HD
Freelancer, Digital Design Enthusiast, Contao Aficionado and Tutorial Junkie @MoinFranko - Carpe diem ...
Der onload_callback könnte zB so aussehen, wenn du ihn selbst machst:PHP-Code:
/**
* onload_callback for the tl_content DCA to inject euf_grid fields into RSCE palettes
*
* @param \Contao\DataContainer $dc
*
* @return void
*/
public function onloadCallback(\Contao\DataContainer $dc)
{
// get the type
$type = null;
if (\Input::post('FORM_SUBMIT') === $dc->table)
{
$type = \Input::post('type');
}
else
{
if ($dc->activeRecord)
{
$type = $dc->activeRecord->type;
}
else
{
$table = $dc->table;
$id = $dc->id;
if (\Input::get('target'))
{
$table = explode('.', \Input::get('target'), 2)[0];
$id = (int) explode('.', \Input::get('target'), 3)[2];
}
if ($table && $id)
{
$record = \Database::getInstance()->prepare("SELECT * FROM {$table} WHERE id=?")->execute($id);
if ($record->next())
{
$type = $record->type;
}
}
}
}
// don't process non-RSCE elements after this
if (!$type || strpos($type, 'rsce_') !== 0)
{
return;
}
// get the palette
$palette = &$GLOBALS['TL_DCA'][$dc->table]['palettes'][$type];
// add the column configuration
if (strpos($palette, 'grid_legend') === false)
{
$palette = str_replace (
'{invisible_legend:hide}',
'{grid_legend},grid_columns,grid_options;{invisible_legend:hide}',
$palette
);
}
}
Hm, wird nicht besser :-)
Danke schaue ich mir morgen mal an ...
Ich dachte es wäre ähnlich möglich wie z.B hier erwähnt
http://help.rocksolidthemes.com/disc...ustom-elements
Sent from my iPad using Tapatalk HD
Freelancer, Digital Design Enthusiast, Contao Aficionado and Tutorial Junkie @MoinFranko - Carpe diem ...
So geht's vermutlich auch, musst du halt für jedes RSCE machen . Wahrscheinlich reicht folgendes im RSCE:PHP-Code:
'grid_legend' => ['inputType' => 'group', 'label' => [$GLOBALS['TL_LANG']['tl_content']['grid_legend'], '']],
'grid_columns' => ['inputType' => 'standardField'],
'grid_options' => ['inputType' => 'standardField'],
Geändert von Spooky (17.06.2018 um 10:30 Uhr)
Freelancer, Digital Design Enthusiast, Contao Aficionado and Tutorial Junkie @MoinFranko - Carpe diem ...
Ich habe jetzt mal die EUF Grid Erweiterung deinstalliert und die obigen Angaben in der RSCE config beibehalten.
Bei Aufruf im BE erhalte ich keine Fehlermeldung bzw. es wird bis auf die Gruppe aus
nichts weiter dargestellt - Soweit schön.Code:'grid_legend' => ['inputType' => 'group', 'label' => [$GLOBALS['TL_LANG']['tl_content']['grid_legend'], '']],
Kann man sowas in der RSCE Config irgendwie abfragen?
Freelancer, Digital Design Enthusiast, Contao Aficionado and Tutorial Junkie @MoinFranko - Carpe diem ...
Ich hab es so probiert:
Funktioniert anscheinend.PHP-Code:
<?php
$rsce_array = array (
// normale RSCE config settings
);
// add EUF Grid if available
if ( !empty($GLOBALS['TL_LANG']['tl_content']['grid_legend']) ) {
$rsce_array['fields']['grid_legend'] = array('inputType' => 'group', 'label' => array($GLOBALS['TL_LANG']['tl_content']['grid_legend'],''));
$rsce_array['fields']['grid_columns'] = array('inputType' => 'standardField');
$rsce_array['fields']['grid_options'] = array('inputType' => 'standardField');
}
return $rsce_array;
Kann man das so machen oder könnte es einem doch irgendwie um die Ohren fliegen?
Geändert von Franko (18.06.2018 um 13:44 Uhr)
Freelancer, Digital Design Enthusiast, Contao Aficionado and Tutorial Junkie @MoinFranko - Carpe diem ...
Hallo zusammen,
ich weiß der Eintrag hier ist schon alt: ich hab die PHP-Code Zeilen in meine rsce_..._config.php eingefügt, jedoch ist im Backend nichts von den Grid-Eingabefeldern zu sehen. Hat sich in den Jahren da etwas geändert? Muss man es anders umsetzen?
Aktive Benutzer in diesem Thema: 1 (Registrierte Benutzer: 0, Gäste: 1)
Lesezeichen