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

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.


อวตาร
ละทิ้ง

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

Related Posts ตอบกลับ มุมมอง กิจกรรม
0
มิ.ย. 24
1948
1
มี.ค. 15
13690
Redirect to tree view with Controller แก้ไขแล้ว
6
ต.ค. 21
19147
4
ต.ค. 20
5516
2
มี.ค. 16
4239