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

Hi,

I followed this tutorial https://www.odoo.com/documentation/13.0/howtos/themes.html

But the code for snippet options didn't work. The result is that I only found the title of the options list without the options. The code I used is :

<template id="snippet_testimonial_opt" name="Snippet Testimonial Options" inherit_id="website.snippet_options">
  <xpath expr="//div[@data-js='background']" position="after">
    <div data-selector=".snippet_testimonial"> <!-- Options group -->
      <div class="dropdown-submenu">
            <a href="#" class="dropdown-item">Your Option</a>
            <div class="dropdown-menu"><!-- Options list -->
                <a href="#" class="dropdown-item" data-select-class="opt_shadow">Shadow Images</a>
                <a href="#" class="dropdown-item" data-select-class="opt_grey_bg">Grey Bg</a>
                <a href="#" class="dropdown-item" data-select-class="">None</a>
            </div>
        </div>
    </div>
  </xpath>
 </template>

Exactly the same cited in the tutorial. But I obtained that :


But it should be like that


Thank you in advance

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

Same thing here.

I noticed that dropdown-menu class applied above, has a display:none so the options are not visible.

If you try to remove that "dropdown-menu" class , then the options will appear just bellow "Your Option" (inside the sidebar, and not on top of the snippet itself as shown in the tutoriel)

Anyway, now that the options are visible, i still can't make them act on the style of the snippet, buy applying opt_shadow or opt_grey_bg class

Anybody can help on that ?

Thanks

Mouad

 

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
4
thg 4 16
6281
3
thg 11 16
4346
Theme Đã xử lý
2
thg 11 24
780
0
thg 10 24
529
1
thg 7 23
1014