Tabs views with different status?

I have a blueprint, where all my projects are listed like a dashboard and I’m trying to split it with different views in Kirby 5.0.3, like:

  • 1 tab for status: published in cards view
  • 1 tab for status: draft in cards view
  • 1 tab for status: all in the new table view

Stangely, both first tabs are showing only Drafts despite the different status?!? Is there something I’ve missed in the new v5 templates functions?

Here is the blueprint:

title: Works
pages: true
icon: cog

tabs:
  works_published:
    label: Publiés
    icon: check
    columns:
      - width: 1/1
        sections:
          published:
            label: Works Publiés
            type: pages
            batch: false
            status: published
            templates: work
            limit: 80
            layout: cards
            columns:
              info: false
              client: true
                type: tags
              date:
                type: text
                value: '{{ page.date.toDate("Y") }}'
                width: 1/20
              designers:
                type: tags
                width: 1/12
              work_field: 
                label: Domaines
                type: tags
              categories:
                label: Categories
                value: '{{ page.category_print }} {{ page.category_identity }} {{ page.category_digital }} {{ page.category_signage }} {{ page.category_image }}'
                type: tags
              homepage_visible:
                label: Home
                width: 1/12
              homepage_link:
                label: Link
                width: 1/12
              case_study_ready:
                label: Case study
                width: 1/12
  works_draft:
    label: Draft
    icon: check
    columns:
      - width: 1/1
        sections:
          published:
            label: Works Draft
            type: pages
            batch: true
            status: draft
            templates: work
            limit: 80
            layout: cards
            columns:
              info: false
              client: true
                type: tags
              date:
                type: text
                value: '{{ page.date.toDate("Y") }}'
                width: 1/20
              designers:
                type: tags
                width: 1/12
              work_field: 
                label: Domaines
                type: tags
              categories:
                label: Categories
                value: '{{ page.category_print }} {{ page.category_identity }} {{ page.category_digital }} {{ page.category_signage }} {{ page.category_image }}'
                type: tags
              homepage_visible:
                label: Home
                width: 1/12
              homepage_link:
                label: Link
                width: 1/12
              case_study_ready:
                label: Case study
                width: 1/12
  works_all:
    label: All (table)
    icon: draft
    columns:
      - width: 1/1
        sections:
          drafts:
            label: Works All
            type: pages
            batch: true
            status: all
            templates: work
            limit: 20
            layout: table
            columns:
              info: false
              client: true
              date:
                type: text
                value: '{{ page.date.toDate("Y") }}'
                width: 3/24
              # designers:
              #   type: tags
              #   width: 1/12
              # work_field: 
              #   label: Domaines
              #   type: tags
              # categories:
              #   label: Categories
              #   value: '{{ page.category_print }} {{ page.category_identity }} {{ page.category_digital }} {{ page.category_signage }} {{ page.category_image }}'
              #   type: tags
              homepage_visible:
                label: Home
                width: 2/16
              homepage_link:
                label: Link
                width: 2/16
              case_study_ready:
                label: Case study
                width: 2/16
  content:
    label: Content
    icon: text
    columns:
      - width: 1/1
        sections:
          works_meta:
            type: fields
            fields:
              # menu_title:
              #   label: Titre de menu
              #   type:  text
              #   width: 1/2
              subtitle:
                label: Sous-titre
                type:  text
                width: 1/2
              text:
                label: Texte
                type:  textarea
                size:  small
              line:
                type: line

Sorry, this blueprint is basically unreadable. What I can see though, is that at least two of the sections have the same name.

Next time, please post properly formatted code! Thank you!

I’ve reposted it with the YAML encoding. Is it better?

Yes, thanks, but as I wrote above, you have two sections called published, which is not possible. All section names, field names etc. must be unique.

Crap thanks. I’ve thought I’ve done this but I’ve done it for the tabs and I’ve forgot the section name. Phew. :sweat_smile: