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

I want to use below method which is call while rendering any page. If I pass ‘/’ in http.route it will call only for homepage not for others like ‘/shop’, ‘/blog’ etc. Also wanted to pass dynamic template rendering in return on the basis of http.route(‘URL’).

@http.route(['/'], type='http', auth="public", website=True)

def custom_controller_func(self, **kwargs):

     values = {

     # some values which is passing in template

  }

   return request.render('website.homepage', values)

Can anyone help me out?

Thanks.


Avatar
Verwerfen

Can i know what exactly you are looking for ? I feel the question is not clear. looking how to connect the url and a template ? or how to pass value to template from controller ?

I cant understand your problem hope this will helps you: http://bit.ly/odoo-web-controller

Verknüpfte Beiträge Antworten Ansichten Aktivität
1
Juli 25
2204
1
März 15
13866
6
Okt. 21
19318
4
Okt. 20
5721
2
März 16
4396