Search code examples
menucontent-management-systemsluggrav

Make slug and menu location independant in GRAV cms


Is it possible to have a simple URL like http://example.com/page_slug and add the page to whatever position I want in the menu especially a child position?

The problem is that whenever I attach a page to a parent menu, I got many levels in the slug like: http://example.com/parent/page_slug


Solution

  • I got the answer here.

    With the option 'routes' in the header section, I can set a specific slug regardless of the folder name or the parent article.

    routes:
        default: '/my_slug'