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

I would like to know how to add menu items to the website portal user menu. So that I can put a new menu item before logout and point it to a controller.

Or if it's possible to just get a document for download.


อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

hello

try with below code.

<template id="website_menuitem" inherit_id="website.layout" name="header menu">
       <xpath expr="//li[@id='o_logout']" position="before">
          <li>
               <a href="/controllername" role="menuitem">Menu name</a>
          </li>
       </xpath>
</template>

I hope this will helps you.

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

Thanks it did the trick. I was trying to it like I found in website_forum module, but it didn't work.

<template id="tabla_instructions_menu_item" inherit_id="website.user_navbar">

<xpath expr="//div[@id='o_website_add_page_modal']//ul" position="inside">

<li groups="website.group_website_designer"><a href="/get-instructions"><i class="fa fa-comment"/><p>Instructions</p></a></li>

Related Posts ตอบกลับ มุมมอง กิจกรรม
8
มิ.ย. 22
17588
1
เม.ย. 19
4836
2
มี.ค. 18
10797
4
มิ.ย. 17
6253
2
เม.ย. 17
7191