Hi all,
I want to add some eye candy for my clients’ panel: In a pages section with a cards layout, I thought it would be cute to override the icon with a custom text. In general, I thought it would be a nice thing to be able to do something like
since it’s not natively possible, does anybody have a suggestion how to write a quick custom plugin to add this functionality? Maybe it’s not worth the effort after all, just thought it would be cute.
The quickest (and it’s really not that quick) that comes to mind would be:
creating a page method that returns an Asset to a non existing svg file
a custom route that responds to requests made to the URL of this non existing svg file, that renders the svg “on the fly” with your number inside of it.
setting the image property of the pages section to the above method:
image: page.makeNumber(page.number)
Disclaimer: haven’t tried it, maybe kirby won’t let you create Asset objects to non existing files…