Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
2 Replies
4670 Tampilan

Why did this work:

<template id="custom_content" inherit_id="website.layout">
 <xpath expr="//main" position="replace">

// content 

</xpath>
</template>


and this not:

<template id="custom_footer" inherit_id="website.layout">
 <xpath expr="//footer" position="replace">

// content 

</xpath>
</template>

Avatar
Buang
Penulis Jawaban Terbai

Ok. Ist working, but:

f i try to build a static footer with just static HTML, its not possible to replace the "default content".

Trying to remove 

<div class="oe_structure" id="footer"></div>

 

<template id="footer_custom" inherit_id="website.layout" name="Footer">    
<xpath expr="//div[@id='footer']" position="replace">
        <div>static content</div>
</xpath>
</template>

causes an error.


And just editing id=footer will be ignored

<template id="footer_custom" inherit_id="website.layout" name="Footer">            
    <xpath expr="//div[@id='footer']" position="replace">
        <div id="footer">
            <div>new content</div>
        </div>
    </xpath>
</template>

it looks like replacing contents inside of if=footer is not possible.

Avatar
Buang
Jawaban Terbai
<template id="footer_custom" inherit_id="website.layout" name="Footer">
    <xpath expr="//div[@id='footer']" position="replace">
        <div class="oe_structure" id="footer">
            <section>
                <div class="container">
                    <div class="row">
                        <!-- content -->
                    </div>
                </div>
            </section>
        </div>
    </xpath>
</template>

I think this would be the way to replace the footer.

Avatar
Buang
Post Terkait Replies Tampilan Aktivitas
1
Feb 17
3158
4
Apr 16
6738
1
Jan 16
6892
3
Nov 16
4830
1
Des 24
5959