Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
1 Beantwoorden
6358 Weergaven

Hi,

Anyone has idea how to replace home page in v11?

Rgds,

Anil


Avatar
Annuleer
Beste antwoord

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
Annuleer
Auteur

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?

Gerelateerde posts Antwoorden Weergaven Activiteit
2
jul. 22
9151
0
nov. 24
2904
0
jun. 21
2460
1
jun. 21
2446
2
feb. 21
299