Skip to Content
Menu
This question has been flagged
2 Replies
3557 Views

Hello friends.... I wanted to customize css in my odoo13 website app, so I inherited the website.assets_frontend but still it is not working...

Note : 1) i had put the website module dependency

            2) i am calling the template through controller

Please check the below code and give suggestions.....

Source code:

sample_webpage.xml

<template id="assets_frontend" inherit_id="website.assets_frontend">
    <xpath expr="link[last()]" position="after">
        <link rel="stylesheet"  type="text/css"  href="/openacademy/static/src/css/openacademy.scss"/>
    </xpath>
</template>

    <template id="sample_webpage">
        <div class="holder">Hello You are done with the task !!!!!!!</div>
    </template>


openacademy.css

.holder {
    color:green;
}


The template(sample_webpage) is working but the css class 'holder' is not working...

Can there be any installation problem or its code problem?


Avatar
Discard
Best Answer

Hello Stalin,

can you please try this,

<template id="assets_frontend" inherit_id="website.assets_frontend">

    <xpath expr="link[last()]" position="after">

        <link rel="stylesheet"  type="text/css"  href="/openacademy/static/src/css/openacademy.css"/>

    </xpath>

</template>


"""openacademy.css"""


.holder {

    color:green;

}


In the above code as mentioned extension of css file is 

"".css"" and while calling he is giving """.scss""" in href so thats why css is not calling.

Regards,




Email:      odoo@aktivsoftware.com  

Skype: kalpeshmaheshwari

   

Avatar
Discard
Author Best Answer

Thankyou...


Avatar
Discard

Instead of posting a new answer to thank, please do upvote the provided answer and mark it as answered.