Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
1210 มุมมอง

Hello,


Is there anyone who knows how to inherit <t t-name="web.CogMenu"> template in v18?

I want to add title/string on button.

<t t-name="web.CogMenu">
<div t-if="hasItems" class="o_cp_action_menus d-flex align-items-center gap-1" t-att-class="{'pe-2': !env.isSmall}">
<div class="lh-1">
<Dropdown menuClass="'lh-base'" beforeOpen.bind="loadPrintItems">
<button class="d-print-none btn" t-att-class="env.isSmall ? 'btn-secondary' : 'lh-sm p-0 border-0'" data-hotkey="u" data-tooltip="Actions">
<i class="fa fa-cog"/>
</button>

Thanks.


Regards,

Hemangi

อวตาร
ละทิ้ง
ผู้เขียน

Yes it works. Thanks.

คำตอบที่ดีที่สุด

Hello,

You can try out the code below, adapting it to your needs:

<t t-name="web.CogMenuInherit" t-inherit="web.CogMenu">
<xpath expr="//button[hasclass('d-print-none')]" position="attributes">
<attribute name="title">Your title here</attribute>
</xpath>
</t>

Best regards!

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
0
ต.ค. 25
2
0
ต.ค. 25
2
0
ต.ค. 25
2
0
ต.ค. 25
2
0
ต.ค. 25
2