ヘルプ

0

How to edit custom webpage template in odoo website

Avatar
Haresh Kansara

Hello all,

I have added one webpage page and working fine in frontend side. but what i want is, i want to edit that custom page template in frontend side. 

I am not able to edit page you can see:

 

But i want edit like:


Can anyone help me?

Thanks in advance


アバター
破棄
4回答
5

Hi Haresh,

If you want to create a custom page that is also editable (for example to add building blocks in it) you have to add a div with the class "oe_structure" inside your XML. The "oe_structure" class will allow you to use building blocks and edit the page. An example:

<?xml version="1.0" encoding="UTF-8"?>
<odoo>
    <record id="client_detail_page" model="ir.ui.view">
    <field name="name">Your page name</field>
    <field name="type">qweb</field>
    <field name="key">module.custompage</field>
    <field name="arch" type="xml">
        <t name="Some custom page" t-name="some_custom_page">
            <t t-call="website.layout">
                <div class="oe_structure">
                    <!-- Any content here (also able to use building blocks in here) -->
                </div>
            </t>
        </t>
    </field>
</record>
</odoo>


Regards,
Yenthe

アバター
破棄
0
Best Answer
 
 Is the line you need.


アバター
破棄
0
Best Answer

you can see that https://www.cybrosys.com/blog/how-to-customize-odoo-12-website-home-page

アバター
破棄
0
Avatar
Nikhil kushwaha
Best Answer

check this class <div id="wrap" class="oe_structure oe_empty"> after  <t t-call="website.layout">


<template id="custom_dashboard">

        <t t-call="website.layout">

            <div id="wrap" class="oe_structure oe_empty">

                This homepage has been overwritten by an imported module !

                <p>

                    <a href="/page/test_module.test_page">Link to page added by imported module</a>

                </p>

            </div>

        </t>

    </template>

アバター
破棄