Maybe I’m just being dumb but i’m having a blueprint that contains a bunch of text like:
kamera:
label: Kamera
type: text
schnitt:
label: Schnitt
type: text
musik:
label: Musik
type: text
kostüm:
label: Kostüm
type: text
and in my php file I wanna display the content along with the name and when a field is empty nothing should be shown. My code is like that and works as expected:
<?php foreach($page->content()->fields() as $field): ?>
<?php if($field->isNotEmpty() && $field->key() == "musik"):?>
<div class="one">
<p class="two"><?= ucfirst($page->musik()->key()) ?></p>
<div class="three">
<?= $page->musik()->kirbytext() ?>
</div>
</div>
<?php endif ?>
<?php endforeach ?>
Kostüm is displayed with the “ü” in the panel but on the page it’s displayed as “kostuem”. This only happens with the key(), and nowhere else. I have <meta charset="UTF-8">
in the header and tried various stuff from the forum like putting <?php header('Content-type: text/html; charset=utf-8'); ?>
after the doctype. Is there anything else i can try?