Kirby3 Panel Plugin - ... is not defined

Hi all,

i would like to create my first panel plugin for kirby 3 and i struggle a little.
With documentations help i get the plugin working inside the panel as separate option but if i try to add a ui kit component like k-text-field i get … is not defined.

34

Is there some tutorial or small documentation for this?

Thanks very much in advance
Raphael

Can you please share the code you’ve written? Seems like the field is missing a prop or something.

Hi Sylvain,

Yes sure…

panel.plugin("docono/company-info", {

// Panel View
views: {
    company: {
        label: "Company",
        icon: "cog",
        component: {
            template: `
                <k-view class="k-company-view">
                    <k-header>
                        {{ $t('companyTitle') }}
                    </k-header>

                    <k-grid>
                        <k-column width="1/2">
                            <k-text-field v-model="text" name="text" label="Boring text" />
                        </k-column>
                    </k-grid>
                </k-view>
    `
        }
    }
  }
});

I just did a copy & paste text field from documentation UI Kit. Maybe i missed something and i have to register fields or have to compile the code. I just need a little guideline how to make things happend :slight_smile:

Thank you

Now i did some more research and found out that almost every Panel Plugin i saw reference to a standard .vue file which has the template code inside like any other VUE application.

But if this is the way to go… the Kirby docs are confusing me