Limit published pages from site blueprint


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

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

But it still possible to publish drafts.

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