how can i create an url rule, with a named parameter of type array?
now i have this, working:
'urlManager' => [
'rules' => [
'page/<id:\w+>' => 'cms/page/view',
],
],
to map 'page/welcome' to module=cms, controller=page, action=view, param $id=welcome
now i would like to have the url like this, with a variable number of folder-name parts:
/page/folder1/folder2/.../folderN/pagefile
for an action:
function actionPage(array $folders, string $id) {
// expecting:
// $folders == [ 'folder1', 'folder2', ..., 'folderN']
// $id == 'pagefile'
}
don't know how to write the rule. i couldn't find any documentation for the rule-syntax.
workarounds are welcome, too!