跳至内容
菜单
此问题已终结
1 回复
1225 查看

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

形象
丢弃
最佳答案

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!

形象
丢弃
相关帖文 回复 查看 活动
0
10月 25
2
0
10月 25
2
0
10月 25
2
0
10月 25
2
0
10月 25
2