Danke, ich habs jetzt versucht aber das funktioniert noch nicht ganz.
Code:
<?php $imgSrc = \Image::get($arrItem['text']['headerbild'], '400', '200', 'center_center'); ?>
<?php $imgHtml = \Image::getHtml($src, $alt = $arrItem['text']['routenname']); ?>
<div class="field headerbild">
<div class="pfeil"> </div>
<a href="<?php echo $arrItem['jumpTo']['url']; ?>" title="<?php echo $arrItem['text']['bergnamehoeheroute']; ?> ">
<div class="value"><?php echo $imgHtml; ?></div>
</a>
</div>
Height und max-width hab ich mit css eingegeben.
Ich sehe nicht das $imgSrc irgendwo verwendet wird?
Vielleicht hast du noch eine Idee?
Danke
Hier die Fehlermeldung:
Code:
Fatal error: Uncaught exception Exception with message Directory "system/themes/flexible/images/" is not a file thrown in system/modules/core/library/Contao/File.php on line 94
#0 system/modules/core/library/Contao/Image.php(823): Contao\File->__construct('system/themes/f...', true)
#1 templates/metamodel_unrendered_startlist.html5(24): Contao\Image::getHtml(NULL, NULL)
#2 composer/vendor/metamodels/core/src/MetaModels/Render/Template.php(301): include('/www/htdocs/w01...')
#3 composer/vendor/metamodels/core/src/MetaModels/ItemList.php(814): MetaModels\Render\Template->parse('html5')
#4 composer/vendor/metamodels/core/src/MetaModels/FrontendIntegration/HybridList.php(105): MetaModels\ItemList->render('', Object(MetaModels\FrontendIntegration\Module\ModelList))
#5 system/modules/core/classes/Hybrid.php(219): MetaModels\FrontendIntegration\HybridList->compile()
#6 composer/vendor/metamodels/core/src/MetaModels/FrontendIntegration/MetaModelHybrid.php(99): Contao\Hybrid->generate()
#7 composer/vendor/metamodels/core/src/MetaModels/FrontendIntegration/HybridList.php(55): MetaModels\FrontendIntegration\MetaModelHybrid->generate()
#8 system/modules/core/elements/ContentModule.php(56): MetaModels\FrontendIntegration\HybridList->generate()
#9 system/modules/core/library/Contao/Controller.php(469): Contao\ContentModule->generate()
#10 system/modules/core/modules/ModuleArticle.php(187): Contao\Controller::getContentElement(Object(Contao\ContentModel), 'main')
#11 system/modules/core/modules/Module.php(154): Contao\ModuleArticle->compile()
#12 system/modules/core/modules/ModuleArticle.php(50): Contao\Module->generate()
#13 system/modules/core/library/Contao/Controller.php(405): Contao\ModuleArticle->generate(false)
#14 system/modules/core/library/Contao/Controller.php(269): Contao\Controller::getArticle(Object(Contao\ArticleModel), false, false, 'main')
#15 system/modules/core/pages/PageRegular.php(129): Contao\Controller::getFrontendModule('0', 'main')
#16 system/modules/core/controllers/FrontendIndex.php(244): Contao\PageRegular->generate(Object(Contao\PageModel), true)
#17 index.php(20): Contao\FrontendIndex->run()
#18 {main}
Lesezeichen