Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
2 Antwoorden
4709 Weergaven

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
Annuleer
Auteur Beste antwoord

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
Annuleer
Beste antwoord
<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
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
1
feb. 17
3181
4
apr. 16
6760
1
jan. 16
6952
3
nov. 16
4895
1
dec. 24
6042