To render the screen you showed, this happens:
ProcessPageAdd::execute() is called. This is hookable, so you could mangle its markup output, but it’s going to be disgusting.
Because neither parent nor template were given, execute() now calls renderChooseTemplate() and immediately returns its result. renderChooseTemplate() is not hookable.
Within renderChooseTemplate(), ProcessPageAdd::executeNavJSON() is called. This is hookable, but it’s not going to be very useful.
executeNavJSON() – surprise – doesn’t return json but an associative PHP array containing, among other things, the templates you’re allowed to add. It will sort these alphabetically by name using ksort().
Back in renderChooseTemplate(), the allowed parents for each of these templates are now queried using this selector:
$pages->find("template=$parentTemplates, include=unpublished, limit=100, sort=-modified")
So now you know why Nadelholzbalken is #1: it was most recently modified. Also it’s hardcoded to only show 100 pages. Both are not easily changed.
So yeah, you’re basically stuck with post-processing the output of ProcessPageAdd::execute() and being limited to the 100 most recently modified pages.
Alternatively you could build the list yourself. It’s only a bunch of links to ./?template_id=123&parent_id=4567 after all. Something like this:
$this->addHookBefore("ProcessPageAdd::execute", function(HookEvent $event) {
$process = $event->object;
if (input()->get('template_id') || input()->post('template_id'))
return;
if (input()->get('parent_id') || input()->post('parent_id'))
return;
//we weren’t given a parent or a template, so we build our own list
$event->replace = true;
$templates = $process->executeNavJSON(array('getArray' => true))['list'];
$out = '';
foreach($templates as $tpl_data) {
if(empty($tpl_data['template_id']))
continue;
$template = templates()->get($tpl_data['template_id']);
if (!$template)
continue;
$out .= "<h3><a href='./?template_id={$template->id}'>{$template->name}</a></h3>";
$parentTemplates = implode('|', $template->parentTemplates);
if(empty($parentTemplates))
continue;
$parents = pages()->find("template=$parentTemplates, include=unpublished, sort=title");
$out .= '<ul>';
foreach($parents as $p)
$out .= "<li><a href='./?template_id={$template->id}&parent_id={$p->id}'>{$p->title}</a></li>";
$out .= '</ul>';
}
$event->return = $out;
});
Obviously this looks like ass, but functionally that’s the gist of it.