跳至內容
選單
此問題已被標幟
1 回覆
4853 瀏覽次數

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

頭像
捨棄
最佳答案

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.

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
3
6月 24
5207
2
11月 16
7457
2
4月 25
7469
3
2月 23
22558
3
4月 21
9008