Liste der Anhänge anzeigen (Anzahl: 1)
[Rocksolid Custom Elements] - Wochenkarte
Hallo,
wir möchten die Custom Elements für eine Wochenkarte verwenden.
Leider klappt das nicht so ganz :(, aber wir finden den Fehler nicht.
Im Frontend wird bei den Wochentagen immer das gleiche Datum ausgegeben.
Hier soll natürlich das Datum rein, das im Backend mit dem Datepicker ausgewählt wurde.
Hier die config Datei:
PHP-Code:
<?php
return array(
'label' => array(
'de' => array(
'Wochenkarte',
),
),
'types' => array('content'),
'contentCategory' => 'Eigene',
'standardFields' => array('headline','cssID'),
'fields' => array(
'gerichte' => array(
'label' => array(
'de' => array(
'Gerichte',
'Fügen Sie eine beliebige Anzahl von Gerichten ein.',
),
),
'elementLabel' => array(
'de' => 'Gericht %s',
),
'inputType' => 'list',
'standardFields' => array('headline','cssID'),
'fields' => array(
'wochentag' => array(
'label' => array(
'de' => array('Wochentag'),
),
'inputType' => 'select',
'options' => array(
'Montag' => 'Montag',
'Dienstag' => 'Dienstag',
'Mittwoch' => 'Mittwoch',
'Donnerstag' => 'Donnerstag',
'Freitag' => 'Freitag',
),
'eval' => array('tl_class' => 'w50'),
),
'myDate' => array(
'label' => array('Datum', ''),
'inputType'=> 'text',
'eval' => array(
'rgxp' => 'date',
'datepicker' => true,
'tl_class' => 'w50',
),
),
'gericht' => array(
'label' => array(
'de' => array('Gericht'),
),
'inputType' => 'text',
'eval' => array('tl_class' => 'w50'),
),
'allergene' => array(
'label' => array(
'de' => array('Allergene'),
),
'inputType' => 'text',
'eval' => array('tl_class' => 'w50'),
),
'beschreibung' => array(
'label' => array(
'de' => array('Beschreibung'),
),
'inputType' => 'text',
'eval' => array('tl_class' => 'w50'),
),
'preis' => array(
'label' => array(
'de' => array('Preis'),
),
'inputType' => 'text',
'eval' => array('tl_class' => 'w50'),
),
),
),
),
);
und hier die html
HTML-Code:
<div class="<?php echo $this->class ?> block"<?php echo $this->cssID ?>>
<div class="bg-white">
<div class="col-sm-12">
<<?php echo $this->hl ?>>
<?php echo $this->headline ?>
</<?php echo $this->hl ?>>
</div>
<div class="row">
<?php foreach ($this->gerichte as $speisen): ?>
<div class="speisekarte-list col-sm-12">
<div class="row <?php echo $speisen->wochentag ?>">
<div class="speisekarte-wochentag col-sm-6"><?php echo $speisen->wochentag ?> <?php if ($speisen->myDate): ?>| <?php echo $this->parseDate("d.m.Y", $speisen->myDate); ?><?php endif; ?></div>
<div class="speisekarte-item first-name ce_autogridwrapper col-sm-10 block">
<p><strong><?php echo $speisen->gericht; ?> <sub><?php echo $speisen->allergene; ?></sub></strong><br><?php echo $speisen->beschreibung; ?></p>
</div>
<div class="speisekarte-item preis ce_autogridwrapper col-sm-2 block">
<p><?php echo $speisen->preis; ?> €</p>
</div>
</div>
</div>
<?php endforeach ?>
</div>
</div>
</div>
Und so sieht das frontend aus:
Anhang 24688
Hat jemand eine Lösung?
LG seagull