Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
3030 Vizualizări

I would like to slightly modify the base page layout for one page. 

So, I created my own template that inherits from portal.frontend_layout:


    <template id="customized_layout" name="Customized Layout for my special page"  inherit_id="portal.frontend_layout">
        .... my code for modifying the default frontend_layout
    </template>

I call it myself in my own page like this:


<t name="My page" t-name="mypage">
   <t t-call="mymodule.customized_layout">

 

The problem is that this new template now becomes effective not only for my mypage page, but for all pages that use portal.frontend_layout.


Is there a clean way to make the inheritance work explicitly for a specific page only without overwriting other pages that call the base template, and also without duplicating entire code of the base templates into my own template?

Imagine profil
Abandonează
Cel mai bun răspuns

Old question, but I have exactly the same. Any success on this?


primary="True" seems the way to go.

See: https://www.odoo.com/de_DE/forum/hilfe-1/why-the-inheritance-of-the-template-affect-the-inherited-template-196238

Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
1
nov. 24
1605
5
iul. 24
92863
1
mai 22
3613
0
ian. 20
2860
1
aug. 19
3105