This question has been flagged
4 Replies
25727 Views

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


Avatar
Discard
Best Answer

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

Avatar
Discard
Best Answer
 
 Is the line you need.


Avatar
Discard
Best Answer

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

Avatar
Discard
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>

Avatar
Discard