コンテンツへスキップ
メニュー
この質問にフラグが付けられました
4 返信
29142 ビュー

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


アバター
破棄
最善の回答

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

アバター
破棄
最善の回答
 
 Is the line you need.


アバター
破棄
最善の回答

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

アバター
破棄
最善の回答

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>

アバター
破棄
関連投稿 返信 ビュー 活動
1
7月 15
6075
2
9月 24
11227
0
8月 22
3082
1
9月 21
5012
0
12月 20
3507