Choose menu anchors, link targets in plugin settings and existing post terms

A menu entry picks its anchor from the linked page, link settings of plugins and own menu
links get page and PDF choice next to the address, and the post settings offer existing
categories and tags to click.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
kantarciandClaude Opus 5 committed 2026-09-22 09:56:07 +02:00
1 parent 3ea28a03fc
commit a976c146de
14 files changed
+306 -7

No files matched your search

+16
View File
@@ -64,6 +64,9 @@ final class EditorController extends AbstractController
'contentType' => $type, 'result' => $result, 'query' => $query, 'status' => $status,
'listRoute' => 'post' === $type ? 'admin_posts' : 'admin_pages',
'areaChoices' => ['header' => $this->partials->choices('header'), 'footer' => $this->partials->choices('footer')],
// Vorhandene Kategorien und Schlagwoerter als Vorschlag - sonst entstehen „Projekt“
// und „Projekte“ nebeneinander.
'termNames' => 'post' === $type ? $this->termNames() : ['category' => [], 'tag' => []],
];
if ($request->isXmlHttpRequest()) {
return $this->json([
@@ -118,6 +121,19 @@ final class EditorController extends AbstractController
return $this->redirectToRoute('admin_editor', ['id' => $id]);
}
/** @return array{category: list<string>, tag: list<string>} */
private function termNames(): array
{
$names = ['category' => [], 'tag' => []];
foreach ($this->posts->allTerms() as $term) {
if (isset($names[$term['kind']])) {
$names[$term['kind']][] = $term['name'];
}
}
return $names;
}
/** The editor reads the style vocabulary and the palette from here, so both stay in one place. */
#[Route('/api/design', name: 'admin_design', methods: ['GET'])]
public function design(): JsonResponse