Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
10874 มุมมอง

I want to integrate a bootstrap snippet on my odoo website, but as you know, a snippet is a block composed from Html, css, and sometimes JS Code, that you can integrate into your Odoo website.

So I used the HTML editor to integrate the HTML Code on my odoo website 

How to also integrate to my odoo website the CSS and JS Code ? is there a way to add this on the default theme ?

 

อวตาร
ละทิ้ง

try to post it like this -> https://bbbootstrap.com

คำตอบที่ดีที่สุด

What I did to add a jquery plugin is in the assets.xml file I added :

<template id="myjq" inherit_id="website.assets_frontend" name="Myjq">

<xpath expr="." position="inside">

<script type="text/javascript" src="/theme_vish/static/src/js/jquery.cycle2.min.js" />

<script type="text/javascript" src="/theme_vish/static/src/js/slideshow.js" />

<script type="text/javascript" src="/theme_vish/static/src/js/backtotop.js" />

</xpath>

</template>


and for the css I did:

<template id="mystyle" name="My style" inherit_id="website.assets_frontend">

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

<link href="/theme_vish/static/less/style.less" rel="stylesheet" type="text/less"/>

</xpath>

</template>


Hopefully, this will help you.

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
1
มี.ค. 23
2026
1
ส.ค. 21
3975
1
มี.ค. 20
3960
while running test got this error? แก้ไขแล้ว
2
ก.ย. 17
8785
1
มี.ค. 17
2525