Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
4 Trả lời
28437 Lượt xem

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


Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất
 
 Is the line you need.


Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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>

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 7 15
5717
2
thg 9 24
10669
0
thg 8 22
2671
1
thg 9 21
4529
0
thg 12 20
3198