Hi there! I have the current setup:
As you can see, there’s some text wrapper in an “accordion” interface element. This text is shown when the user clicks in the “+”.
Currently the full text is just a field with
type: textarea, and I’m using
kirbytext() to render it in the template. This works well not because I only have paragraphs, but I’m not sure how to implement this “accordion” right in the middle of the text.
Where should I be looking at or how would you suggest to resolve this? Thank you.
So you want a way to continue writing your text as normal but be able to integrate an accordion whereever you need, i.e. without having the accordion in a separate field?
- Use the blocks field with a custom accordion block:
Thank you! I’m trying to set a standard text block with some test content to be shown by default. However, it won’t show in the Panel. Not sure what I’m doing wrong. The blueprint:
# title & SEO
label: 'SEO Title'
label: 'SEO Meta description'
label: 'Cover Image'
label: 'Header Title'
label: 'Header Intro'
- type: text
text: test content
label: 'Text Image'
What I’m doing wrong?
Your blueprint should work fine, but keep in mind that default content is only ever added at page creation, not when you add the field after that.
Oh, makes sense. Thank you!