Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie

Hi everyone,

I'm working on a custom module in Odoo 17 where I need to override the "Contact Us" page template (website.contactus). 

My goal is to add a custom block to the existing structure without disrupting the web editor's functionality. 

So far, my attempts have resulted in the page being edited, but most blocks from the web editor are locked ("No location to drop in"). 

Just replacing the existing title (h1) with the exact same code is enough to lock the blocks.


Here's an example of what I tried:

template id="contactus_override" inherit_id="website.contactus"
    xpath expr="//div[@id='wrap']/section//h1" position="replace"
        h1 Hello World! /h1
    /xpath
/template
The code is weird because I couldn't write it without it being processed

Has anyone faced a similar issue or can suggest a solution to keep the section editable while adding custom content?

Thanks in advance for your help!

*Edit*
It seems to be due to the class "oe_structure", when overriding a template, the original oe_structure does not seem to work anymore. I would still appreciate the help if someone has a solution. 

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
3
cze 24
3379
0
paź 24
531
0
sie 24
428
4
maj 24
2392
1
maj 24
1134