Define the type of headline h1, h2... in panel

Hey,

i want to define the type of headline in the panel with a selct field.

Blueprint:

  kindofheadline:
    label: Überschrift-Kategorie
    type: select
    options:
      1: h1
      2: h2

Template:

<h<?= $page->kindofheadline() ?>>...</h<?=$page->kindofheadline() ?>>

But the h1 tag ist

<hh1>...</hh1>

I tried different variants - unfortunately it doesn’t work. What am I doing wrong?

Thank you!

Sorry i am to stupid :slight_smile:
What is wrong?

If you want to use numerical keys, you have to use the long form as explained in the docs I linked to above.

Sorry again - now i know whats wrong :crazy_face:
OMG it’s so simple…

options:
      - value: '1'
        text: h1
      - value: '2'
        text: h2

Thank you :slight_smile:

You are welcome!

1 Like