Closed Metis77 closed 4 years ago
this returns the translated value of the building type. e.g. "Reihenhaus". <?= $this->getFormatted($realEstate, 'buildingType') ?>
<?= $this->getFormatted($realEstate, 'buildingType') ?>
this gives me the id of the building type. e.g. "1" <?= $realEstate->buildingType ?>
<?= $realEstate->buildingType ?>
but how would I get the translated label of the buildingType? e.g. "Art des Hauses"
would you suggest to do it like this: <?= $this->attributes['buildingType'] ?>
<?= $this->attributes['buildingType'] ?>
Yes, the attribute list is a mapping attributeName → label.
attributeName
label
Of couse you can also use the Contao translator if you prefer this:
<?php echo $this->trans('immoscout24.buildingType'); ?>
this returns the translated value of the building type. e.g. "Reihenhaus".
<?= $this->getFormatted($realEstate, 'buildingType') ?>
this gives me the id of the building type. e.g. "1"
<?= $realEstate->buildingType ?>
but how would I get the translated label of the buildingType? e.g. "Art des Hauses"
would you suggest to do it like this:
<?= $this->attributes['buildingType'] ?>