New Plugin: Panel Button Field (WIP)

Hi there, I am currently working at my first universal Kirby mini plugin that I intend to release.

Kirby Button Field

It lets you add an button to your blueprint that can either open a URL in a new tab (eg. to refer the user to some external website) or it can trigger some URL and wait for the response (eg. to trigger some web hook or Kirby route).

I would be happy if some people would try it and suggest ideas for improvement, file issues or PRs. I will later also add it to the plugins archive on the Kirby website.

Thank you!

1 Like

I’m trying to use the plugin. But I can’t understand what I have to do to let the button turn to green…

Thank you!

            fields:
              nm_butt1:
                type: button
                text: Allinea date
                url: "https://localhost/hunted15/site-core/command_panel?action=nmSetDate&uri={{page.uri}}"
                icon: edit
                open: false

immagine

The button will be green when you add a theme, see documentation of the plugin.

The red color probably means you clicked on the field and your endpoint returned an error.

1 Like

Make sure that the response of the call is valid json.
Had the same problem yesterday.

The page reload still doesn’t work.

Can I add a response message? E.g. after the webhook has been finished that the button says something like “Success”?

janitor plugin can do that Kirby3 Janitor - a panel button to run jobs defined in php

thanks bruno, i tried your plugin before and didn’t know it already had advanced functions to customize action buttons.

It seems to be a bit more complicated but I will certainly do a few tests. Thanks for the suggestion.