Das hier im template mod_iso_rangefilter.html5 könnte funktionieren, auch wenn es nicht wahnsinnig elegant ist:
Ersetze:
HTML-Code:
<?php foreach ($this->fields as $config): ?>
<div id="slider-<?= $config['attribute'] ?>-<?= $this->id ?>">
<input type="hidden" name="<?= $config['attribute'] ?>[min]" id="ctrl_<?= $config['attribute'] ?>_min_<?= $this->id ?>" value="<?= $config['min'] ?>">
<input type="hidden" name="<?= $config['attribute'] ?>[max]" id="ctrl_<?= $config['attribute'] ?>_max_<?= $this->id ?>" value="<?= $config['max'] ?>">
</div>
<?php endforeach; ?>
Durch:
HTML-Code:
<?php foreach ($this->fields as $config): ?>
<?php $welchesAttribut = \Database::getInstance()->prepare("SELECT * FROM tl_iso_attribute WHERE field_name=?")->execute($config['attribute']); ?>
<label><?= $welchesAttribut->name; ?></label>
<div id="slider-<?= $config['attribute'] ?>-<?= $this->id ?>">
<input type="hidden" name="<?= $config['attribute'] ?>[min]" id="ctrl_<?= $config['attribute'] ?>_min_<?= $this->id ?>" value="<?= $config['min'] ?>">
<input type="hidden" name="<?= $config['attribute'] ?>[max]" id="ctrl_<?= $config['attribute'] ?>_max_<?= $this->id ?>" value="<?= $config['max'] ?>">
</div>
<?php endforeach; ?>
Kenne sonst keine Möglichkeit an den Namen des Attributs zu kommen, wenn er nicht direkt in den Variablen zu finden ist. Wahrscheinlich hat jemand anders eine bessere Idee…!?
Lesezeichen