Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
4692 Widoki

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?).

Awatar
Odrzuć
Najlepsza odpowiedź

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.

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
3
cze 24
4693
2
lis 16
7262
2
kwi 25
7246
3
lut 23
22324
3
kwi 21
8833