You can create a page model that overwrites the default url()
method for the child template.
<?php
class ChildtemplatePage extends Page {
public function url() {
return $this->site()->url() . '/' . $this->uid();
}
}
Replace “Childtemplate” with the name of the child template.