Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
6338 Visualizzazioni

Hi,

Anyone has idea how to replace home page in v11?

Rgds,

Anil


Avatar
Abbandona
Risposta migliore

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
Abbandona
Autore

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?

Post correlati Risposte Visualizzazioni Attività
2
lug 22
9098
0
nov 24
2888
0
giu 21
2453
1
giu 21
2382
2
feb 21
299