Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
6357 มุมมอง

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?

Related Posts ตอบกลับ มุมมอง กิจกรรม
2
ก.ค. 22
9146
0
พ.ย. 24
2902
0
มิ.ย. 21
2459
1
มิ.ย. 21
2441
[SOLVED] Get related field แก้ไขแล้ว
2
ก.พ. 21
299