DERHAEUPTLING / contao-immobilienscout24-import-bundle

ImmobilienScout24 Import Plugin for Contao
GNU General Public License v3.0
1 stars 2 forks source link

question: get the label #8

Closed Metis77 closed 4 years ago

Metis77 commented 4 years ago

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'] ?>

m-vo commented 4 years ago

Yes, the attribute list is a mapping attributeNamelabel.

Of couse you can also use the Contao translator if you prefer this:

<?php echo $this->trans('immoscout24.buildingType'); ?>