But the issue is that I have two sections under Releases (releases/discography and releases/writings) that each have their own children. When I navigate to those, releases reappears in the URL, when what I want is /discography/$uid or /writings/$uid
If I replace releases/(:any) with releases/(:all) then the URL looks correct, but doesn’t link to content. Trying to maintain legacy URLs as much as possible here, so would love to find a solution for this. I still need to be able to navigate to simply /discography or /writings though.
<?php
class listing_releasesPage extends Page {
public function url() {
return $this->site()->url() . '/' . $this->uid();
}
}
as a starting point and I’m getting the error:
Fatal error : Declaration of listing_releasesPage::url() must be compatible with Kirby\Cms\Page::url($options = NULL): string in ----/site/models/listing_releases.php on line 3
Could you please help me with what I’m doing wrong here? I know this example was K2, but I couldn’t find anything in the docs that talked about this in terms of Page Models. listing_releases is the the template for the child of /releases/ in the route above.