Odoo Help

0

How to add a Jquery Slideshow to my custom theme in Odoo version 8 ?

By
Vaishal Patel
on 7/1/16, 6:33 AM 849 views

I am new to odoo and would like to know how I could add a slider like the jquery cycle2 into my websites custom theme: I have tried to place the following code:

<template id="myjq" inherit_id="website.assets_frontend" name="Myjq">
<xpath expr="script[last()]" position="after">
<script type="text/javascript" src="/theme_vish/static/src/js/jquery.cycle2.min.js" />
</xpath>
</template>

into my assets.xml but to no avail. What am I doing wrong here ?

Yenthe I have amended the xpath. Sorry what would it be for this specific example id have to add in the dependencies?

Librex, Vaishal Patel
on 7/1/16, 7:42 AM
1
Yenthe
On 7/1/16, 7:04 AM

Hi Vashial,


Your xpath is incorrect so your custom JS is not added to the website. The fix:

<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" /> </xpath> </template>

P.S: Don't forget to add your dependencies in the __openerp__.py file.

Yenthe

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

2 follower(s)

Stats

Asked: 7/1/16, 6:33 AM
Seen: 849 times
Last updated: 2/13/17, 9:24 AM