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

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

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

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!

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 10 25
2
0
thg 10 25
2
0
thg 10 25
2
0
thg 10 25
2
0
thg 10 25
2