From 8642b0c40966d51d529691d20ab503493bc2cf4e Mon Sep 17 00:00:00 2001 From: Benoit Socias Date: Mon, 16 Oct 2023 11:05:06 +0200 Subject: [PATCH] [IMP] website: make table of content fully previewed during drag Before this commit, the "Table of Content" snippet only got its navigation part rendered once the block was dropped. In [1] when the "New page from template" feature was introduced, a default pre-rendered content was introduced so that the "Table of Content" snippet was properly rendered in the template previews where it was used. This commit moves this pre-rendered content from [1] into the base definition of the snippet itself. There is no collision problem regarding the default ids that are included because the dynamic content is re-generated when the block is dropped and whenever the headers texts are changed. [1]: https://github.com/odoo/odoo/commit/e0796020ee0c3188e1e9d9fa077de73a2211c6f7#diff-bee4662b672e30dbfb9778f8747fee45698d9b8d16282d8f80066d8a30137928R35-R50 task-3555325 Part-of: odoo/odoo#138748 --- .../views/new_page_template_templates.xml | 17 ----------------- .../views/snippets/s_table_of_content.xml | 11 ++++++++--- 2 files changed, 8 insertions(+), 20 deletions(-) diff --git a/addons/website/views/new_page_template_templates.xml b/addons/website/views/new_page_template_templates.xml index 9eed0a79192..f776d05a4d7 100644 --- a/addons/website/views/new_page_template_templates.xml +++ b/addons/website/views/new_page_template_templates.xml @@ -1084,23 +1084,6 @@ overridden by modules), because: - - -