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

the addon website_sale his this template:


        

    <template id="template_header_default" inherit_id="website.template_header_default">
        <xpath expr="//t[@t-foreach='website.menu_id.child_id']" position="after">
            <t t-call="website_sale.header_cart_link">
                <t t-set="_icon" t-value="True"/>
                <t t-set="_item_class" t-value="'nav-item mx-lg-3'"/>
                <t t-set="_link_class" t-value="'nav-link'"/>
            </t>
        </xpath>
    </template>

In my module i want to place that cart in another place,

basically i want to change that xpath expression to


<xpath expr="//t[@id='myid']" position="after">


I cant seem to find how to do it. On the forum i read that I only need to make a template with the id="website_sale.template_header_default" in my own module and that will override the existing template, but that does not seem to work.


I am probably overseeing the obvious    



Ảnh đại diện
Huỷ bỏ

The template and xpath expressions don't come through in your message. You may want to try again and escape the xml.

I mean, try putting those bits in a "code" block.
You can create code blocks in questions and answers by starting a line with "/". That will pop up a list of possible styles, and code is one of those.

Tác giả

updated

Tác giả Câu trả lời hay nhất

@esmeralda, it was in a code block. For some reason it doesnt automatically auto htmlescape tags ... 

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 12 22
2613
1
thg 11 22
2497
1
thg 5 22
2838
1
thg 6 25
1948
3
thg 7 25
3540