Kirby

Is there any way to use a section headline to link to a blueprint

I was wondering if there was a way to use the headline of a section in the panel as a link to another blueprint ?

What do you mean with link to a blueprint?

I would like to be able to click on the headline and be redirected to a blueprint i created

You probably mean a page with a given blueprint, not the blueprint file itself, I guess. But links in headlines don’t seem to work.

Like with the standard photography section you have a overview of all the albums, but when you click on the headline photography you go to an expanded overview of your albums.

I noticed this only works when you use something like this:

- width: 1/1
    sections:
      photography: sections/albums

My section looks like this

- width: 1/4
    sections: 
      images: sections/fotos
        headline: Foto album
        type: files
        parent: site.find("fotos")
        layout: list
        template: image
        info: "{{ file.dimensions }}"
        image:
          ratio: 5/4
          cover: true
        min: 1
        size: small

Your syntax is not correct:

- width: 1/4
    sections: 
      images:
        headline: Foto album
        type: files
        parent: site.find("fotos")
        layout: list
        template: image
        info: "{{ file.dimensions }}"
        image:
          ratio: 5/4
          cover: true
        min: 1
        size: small

And also, you are using a files section not a pages section.

That is correct I am using a files section because its an image gallery that does not use albums.
Is there any way I can make the headline work like the headline for a pages section ?

No, I don’t think the headline currently accepts anything but strings. You would have to create a custom section for that and redefine the headline.

Okay thanks i’ll try that then

Could you give me a little push in the right direction on how to redefine the headline in a way that it works like a headline for pages section ?

No, not from the top of my head. I suggest you have a look at this plugin how to modify an existing section: https://github.com/rasteiner/k3-pagesdisplay-section

Hi,
I am trying to make a media library without the gallery part.

If I set my type to pages the files are not displayed, but I can click the headline(Foto’s) of the section and go to a bigger overview.
fotos1
My site .yml:

- width: 1/1
    sections:
      notes: sections/fotos

My sections/fotos with the type set to pages

type: pages
headline: Foto's
parent: site.find("fotos")
size: tiny
info: "{{ page.images.count }} image(s)"
layout: cards
template: image
empty: No fotos yet
image:
  query: page.cover
  cover: true
  ratio: 5/4

When I set the type to files the images are shown:
fotos2

But I cannot click on the headline(Foto’s) to go to a bigger overview.

My sections/fotos with the type set to files:

type: files
headline: Foto's
parent: site.find("fotos")
size: tiny
info: "{{ page.images.count }} image(s)"
layout: cards
template: image
empty: No fotos yet
image:
  query: page.cover
  cover: true
  ratio: 5/4

Does anyone know how I can make the headline of the type files behave the same way as the headline with type pages ?

No, that’s not possible out of the box. You could create a custom files section where you override the headline method (and the component)

Isn’t this the same question as this one: Is there any way to use a section headline to link to a blueprint

I’ve moved it into the old post.

Please do not create new topics for the same stuff.