PhlySimplePage icon indicating copy to clipboard operation
PhlySimplePage copied to clipboard

child_routes

Open str opened this issue 10 years ago • 2 comments

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?

str avatar Jun 06 '15 14:06 str

@str Do you have any solution of this!

vrkansagara avatar Nov 14 '17 15:11 vrkansagara

@vrkansagara I went away from ZF, I preferred convention over configuration, and ZF went away from that. I'm sorry.

str avatar Nov 15 '17 14:11 str