Page visible = false but reachable with the browser?

Hi again,

i have some invisible pages as part of another page. But you can reach those “part pages” with the browser. Is it possible to hide them from the navigation?

Thx for help.

You could route people trying to visit your “part pages” elsewhere, eg to their parent page:

// Routes

c::set('routes', array(
    'pattern' => 'parent-page/(:any)',
    'action'  => function() {

Read more about this in Kirby’s documentation.

These are two different issues.

  • to hide them from the navigation, filter nav items by visibility status.
  • to make these pages inaccessible via the browser (i.e. if they are called manually)use a route or add a redirect in your templates.

Thx it works.

I have different urls for the languages so i always need routes * language? Or is there a unique url identifier?

You need routes per language if you use URL-keys.

thanks for your help!