From cd9eac6a6c4e2ed07d03c605c20c2c8a09bf7c7e Mon Sep 17 00:00:00 2001 From: Sylvain Boissel Date: Tue, 20 Aug 2024 10:37:14 +0200 Subject: [PATCH] Start work on pagetreeblock --- content_manager/blocks.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/content_manager/blocks.py b/content_manager/blocks.py index 0054a02d..637f850a 100644 --- a/content_manager/blocks.py +++ b/content_manager/blocks.py @@ -944,12 +944,16 @@ class Meta: template = "content_manager/blocks/full_width_background.html" +class PageTreeBlock(blocks.StructBlock): + page = blocks.PageChooserBlock(label=_("Parent page")) + + class SideMenuBlock(blocks.StreamBlock): html = blocks.RawHTMLBlock( label="HTML", help_text=_("Warning: Use HTML block with caution. Malicious code can compromise the security of the site."), - group=_("Expert syntax"), ) + pagetree = PageTreeBlock(label=_("Page tree")) class Meta: icon = "minus"