In order to display each property on another line, I need to use the tag. Is there a way to accomplish the same result without having to use the tag?
This is how I need to put it to cause a line break:
<br>Höhe: 90 cm
<br>Breite: 90-200 cm </br>
<br>Länge: 200 oder 220 cm </br>
<br>Bettbreite: 110-220 cm </br>
<br>Bettkantenhöhe: Standard 38 cm oder Komfort 45 cm</br>
Thanks, that did it but the letters are in lower case and there is a dash at the top which I can’t get rid of with too much spacing between Produktinfos and ‘höhe’. Also the number values are in quotes which is not what I want.
This is the entire yml code:
title: Betten
preset: page
num: zero
duplicate: true
status:
draft: true
listed: true
fields:
Name:
label: Produktname
type: text
Beschreibung:
label: Beschreibung
type: text
Accordionbeschreibungeins:
label: Produktinfos
type: structure
fields:
Höhe:
label: Höhe
type: text
Breite:
label: Breite
type: text
Länge:
label: Länge
type: text
Bettbreite:
label: Bettbreite
type: text
Bettkantenhöhe:
label: Bettkantenhöhe
type: text
Accordionbeschreibungzwei:
label: Oberfläche
type: text
files:
label: Produktbild
type: files
template: image
structure:
label: Holzarten
type: structure
fields:
image:
label: Image
type: files
layout: cards
max: 1
label:
label: Label
type: text
default: Label
structuretwo:
label: Stoffe
type: structure
fields:
image:
label: Image
type: files
layout: cards
max: 1
label:
label: Label
type: text
default: Label
Hi, I read the doc link you provided and the issue is still the same. This is the corresponding code snippet from the template: <div><?php echo nl2br($betten->accordionbeschreibungeins()); ?></div>
And this is the edited yml part:
Accordionbeschreibungeins:
label: Produktinfos
type: structure
fields:
Hoehe:
label: Höhe
type: number
Breite:
label: Breite
type: number
Laenge:
label: Länge
type: number
Bettbreite:
label: Bettbreite
type: number
Bettkantenhoehe:
label: Bettkantenhöhe
type: number
Not to add to the confusion, but unless you want to have more than 1 “Bettkantenhöhe” per product, the structure field won’t add anything useful to your situation.
The structure field is for “repeating content”.
The textarea is completely fine for your needs. Don’t use the the structure field for this.
Or just go back to what you had initially and add the same nl2br function around the field, like you have in your last code snippet, that’s fine too.
If you’re interested in Kirby, you really should however learn how fields and field methods work.