Hello!
I want to display a list – wich is part of a block – in the panel using Vue. The list is not supposed to be editable, so a “K-Input” unfortunately doesn’t help (unless I could disable wysiwyg completly). I have successfully managed to split a structure field with a “v-for” loop and display it in the panel but that does not work with a list. With my current Code I get an output where every character is in a single <li></li>
Element.
My setup is more or less based on the cookbook for Kirby Blocks.
Thanks a lot for any help!
speciallist.yml
name: Special List
wysiwyg: false
content:
fields:
headline:
label: Headline
type: text
facts:
label: Facts
type: list
speciallist.vue
<template>
<div v-if="this.content" v-on:click="open">
<div class="headline">
{{ content.headline }}
</div>
<ul>
<li v-for="fact in content.facts" :key="fact">
{{ fact }}
</li>
</ul>
</div>
</template>
<script>
export default {
name: 'Special List',
}
</script>
Current Outcome
<
u
l
>
<
l
i
>
I
t
e
m
<
/
l
i
>
<
/
u
l
>