Skip to content
This repository was archived by the owner on Aug 17, 2025. It is now read-only.
This repository was archived by the owner on Aug 17, 2025. It is now read-only.

child_routes #13

@str

Description

@str

I'm trying to figure out how to create a route so I don't have to create a route for each page I have. I thought it would using child_routes

            'page' => [
                'type'    => 'Literal',
                'options' => ['defaults' => [
                    'controller' => 'PhlySimplePage\Controller\Page',
                    'template'   => 'page/:page',
                ], 'route' => '/page'],
                'may_terminate' => true,
                'child_routes' => ['default' => [
                    'type'    => 'Segment',
                    'options' => [
                        'defaults'    => [],
                        'route'       => '/:page',
                        'constraints' => ['page' => '[a-zA-Z][a-zA-Z0-9_-]*',],
                    ],
                ]],
            ],

or something similar. Is this possible? If so, what am I doing wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions