Ndugu
January 5, 2020, 6:03am
1
I have structure fields in my site.yml that I want to display in the footer.
headline: Bankverbindung
icon: cog
width: 1/3
fields:
spendenkonto:
label: Empfänger
type: editor
allowed:
- paragraph
width:1/3
iban:
label: Iban
type: text
bic:
label: BIC (SWIFT-CODE)
type: text
I use
<p> <?= $site->iban()->html() ?></p>
and it displays the content of that field. But I like to also display the title of that field.
You probably mean the label (Iban)?. You could access the label via $site->blueprint()
(see https://getkirby.com/docs/cookbook/templating/blueprints-in-frontend ), but why do that when you can simply hard code it in the template since that’s not going to change.
Why do you ask about structure field and tabs? I can’t see a structure field in that blueprint excerpt?
Ndugu
January 5, 2020, 1:31pm
3
Oh. I thought about hardcoding it, but I then thought that this would show that I am unprofessional…
And I didn’t want to show the whole blueprint because I thought that would be too much. It is this:
title: Site
tabs:
content:
label: Seiten
icon: text
layout: cards
width: 1/3
sections:
pages:
type: pages
headline: Seiten
layout: cards
sortable: false
files:
type: files
headline:
de: Globale Dateien
en: Global files
datenschutz:
label: Datenschutz
icon: cog
width: 1/3
fields:
dsgvoText:
label: Text
type: textarea
size: medium
impressum:
label: Impressum
icon: cog
width: 1/3
fields:
impressumText:
label: Impressum
type: textarea
size: medium
bank:
headline: Bankverbindung
icon: cog
width: 1/3
fields:
spendenkonto:
label: Empfänger
type: textarea
allowed:
- paragraph
width:1/3
iban:
label: Iban
type: text
bic:
label: BIC (SWIFT-CODE)
type: text
options:
changeTitle: false
changeStatus: false
delete: false
changeSlug: false
files: true
files: true
pages: false
But to access the blueprint just to get such a simple label to me seems absolute overkill.
I was just wondered about the topic title because there is still not structure field to be seen in the whole blueprint… (going to change the title).
Ndugu
January 5, 2020, 1:51pm
5
Shoot - you’re right. I meant the tabs in the site panel. This structures things differently for users than having pages for that. Maybe that made me talk of a structure field.