تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
984 أدوات العرض

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!

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
1
يوليو 25
79
0
يوليو 25
108
1
يوليو 25
312
1
يونيو 25
943
1
يوليو 25
900