2

I want to use Xpath to replace my website menu of odoo 8.

I don't want to replace all the header, but only one element in the menu : The shop

When i inspect the element li , i see this :

<span data-oe-model="website.menu" data-oe-id="5" data-oe-field="name" data-oe-type="char" data-oe-expression="submenu.name" data-oe-translate="1">Shop</span>

I want to replace this element by creating a mega menu only for "shop".

I don't know how to use Xpath for this case.

Any solution ? Thank's

Bhoomi Vaishnani
  • 718
  • 4
  • 19

1 Answers1

0
<template id="any_new_id" inherit_id="module_name.id_of_template">
    <xpath expr="//span" position="replace">
      your mega menu code
    </xpath>
 </template>

if you have any unique identifier then you can use it like this expr="//span[@id='span_id']" otherwise it replace all span tags

KbiR
  • 4,047
  • 6
  • 37
  • 103
MohitGhodasara
  • 2,342
  • 1
  • 22
  • 29