Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
4635 Vistas

Good morning / afternoon / evening to everyone.

I'm currently working on a eCommerce shop that will have full width banners displayed on homepage. I managed to make a working (and looking close to what designer wanted) snippet of it using modified Bootstrap carousel.

Now, my problem is that in order to add a new banner image and navigation dot I need to go to snippet code in module files and add it there manually then delete and add snippet again using Website Builder, but I would like to make it so that I can access some kind of page in Odoo backend (using <menuitem> in Python code?) with a list of banners displayed so that I can delete and add new banners (upload image, add title, add alt tag, add optional link to another page etc.), maybe re-arrange them if needed.

Basically I need to make something like Master Slider (http://www.masterslider.com/) in Wordpress where I can easily manage them.

How would I even start making something like that? It doesn't need to be a snippet in my existing theme. I can make a new module if needed (it might even be more future proof, because I will be able to easily re-use it on another website later), but I have no idea what I should start creating (models, controllers, actions?).

Avatar
Descartar
Mejor respuesta

You should create new fields, not models. Add fields on the website model. Name it like x_banner_1 (set the field to binary and use image widget to upload the img). Then with a t-field call that image on the homepage and give it a proper css class, or bootstrap. Same goes with text fields (set it char for short) and then just call them on the page. Hope this is helpful.

Avatar
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
3
jun 24
4435
2
nov 16
7155
2
abr 25
7133
3
feb 23
22164
3
abr 21
8725