Limit published pages from site blueprint

#1

Hi,

What is the good way to limit the number of published pages ? it seems possible as I can see here so I tried:

    sections:  
      published:
        headline: Published pages
        type: pages
        status: listed
        max: 1
      unlisted:
        headline: Hidden pages
        type: pages
        status: unlisted
      drafts:
        headline: Drafts
        type: pages
        status: draft
        templates: default
        

But it still possible to publish drafts.

#2

Hm, yes, that doesn’t work as you would probably expect. But max settings across different sections are a bit tricky and as far as I recall, there is an issue somewhere (have to check).

What you could do is use a route:before hook to throw an error.

1 Like