Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
1 Antworten
6350 Ansichten

Hi,

Anyone has idea how to replace home page in v11?

Rgds,

Anil


Avatar
Verwerfen
Beste Antwort

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

Avatar
Verwerfen
Autor

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?

Verknüpfte Beiträge Antworten Ansichten Aktivität
2
Juli 22
9101
0
Nov. 24
2892
0
Juni 21
2453
1
Juni 21
2383
2
Feb. 21
299