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

Hi,

Anyone has idea how to replace home page in v11?

Rgds,

Anil


頭像
捨棄
最佳答案

Hi,

You can try something like this,

from odoo import http
from odoo.addons.website.controllers.main import Website

class Website(Website):

@http.route(auth='public')
def index(self, data={}, **kw):
super(Website, self).index(**kw)
return http.request.render('<template_external_id>', data)


Thanks

頭像
捨棄
作者

Thanks, This is the exact answer for replacing home page. Could be possible to override with page template id? I want to append the base template, the route will pass some information in the response dictionary. like we have template ID as homepage in v10, what is the template ID for homepage in v11?

相關帖文 回覆 瀏覽次數 活動
2
7月 22
9177
0
11月 24
2916
0
6月 21
2478
1
6月 21
2455
2
2月 21
299