İçereği Atla
Menü
Bu soru işaretlendi
1443 Görünümler

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. 

Avatar
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
3
Haz 24
3655
0
Eki 24
619
0
Ağu 24
474
4
May 24
2524
1
May 24
1332