Hello!
I want to decorate my admin panel with nice icons, however if the page has uploaded files inside, kirby shows them instead of the icons that I set. I didn’t find any way to stop kirby from forcing this.
Ideas? I’m using Kirby 3.0.1
Hello!
I want to decorate my admin panel with nice icons, however if the page has uploaded files inside, kirby shows them instead of the icons that I set. I didn’t find any way to stop kirby from forcing this.
Ideas? I’m using Kirby 3.0.1
I have the same problem. Is there an option to change this?
Try image: false
in the blueprint if the pages section where you want this.
Where in the blueprint should I add this for subpages?
if you mean in the .yml-File: That doesnt work. Just to be clear: I still want the images in the files section - just not as icon on the parent side…
But setting the image
option to false
in the pages section should display the icon instead of images.
E.g in the Starterkit’s blueprints/sections/albums.yml
type: pages
headline: Photography
parent: site.find("photography")
size: tiny
info: "{{ page.images.count }} image(s)"
layout: cards
template: album
empty: No albums yet
image: false
This will show the icons in the dashboard instead of the images.
Maybe I don’t understand the problem well, in that case could you please provide more detailed explanations with an example and what exactly you expect.
If I don‘t use sections-blueprints on an update of a k2-website, where in a yml-file must I add this line?
[Added later:]
reading the following, I learned:
… in the sections part of the sites or page blueprint
What do you use to display pages if not sections? A preset? Please provide details/your blueprint.
Ah okay. In my case, it was the site.yml
where i had to add this. I thought you mean the blueprint of the page. That actually works. Would be good to mention that somewhere in the docs, f.e. in the part where it’s explained how to set the icons…
Thanks!
Had the same problem.
But with image: false
you don’t see any images and RastaTux wanted to see icons.
For me image: icon
was working here.
Hello,
I do not get this to work on my page blueprint.
I use icon: home
. But instead of using this icon the panel chooses the last uploaded image from that page (page has no sub pages). I tried several combinations of placing image: icon
or image: false
inside the blueprint. Either nothing happens or I get an error: array_merge(): Argument #3 must be of type array, string given
.
The image the panel uses is from a structure field wich includes a files field.
Could you please post the pages section definition from your blueprint?
It’s a onepager website with a single blueprint/pages
blueprint without blueprint/sections/
parts.
title: Home
icon: home
sections:
fields:
type: fields
fields:
section_1_headline:
label: Eingangstext
type: headline
carousel:
label: Karussell
type: structure
fields:
title:
label: Titel
type: text
text:
label: Text
type: writer
icon:
label: Icon (als SVG)
type: files
section_3_headline:
label: Bereich XYZ
type: headline
...
And where is the section where you want the icon instead of the images to appear? Not seeing a pages section here… Probably in site.yml?
There are no page sections because it’s a onepager website. Like there is only one “layer” and no child pages planned so far. As you can see on the screenshot I use the default.yml (opened in the middle) and at the right side you can see the icon which is taken from the files field and should only be used in the frontend not overwrite icon: home
in the panel.
I am aware of page sections and used them in another project with success. But this site does not need subpages.
But the pages section we see in your screenshot on the right is defined in your site.yml, right? Could you please post this site.yml blueprint here?
Thank you for your help, I am sorry I missed that. I saw the above mention of site.yml as a generic term as “the site blueprint in question”. image: icon
now works. I am fine with setting that option to all pages.
You could also set the ‘query’ parameter to false,
then You could still change the background color for example.
image:
query: false
icon: page
back: white