跳至內容
選單
此問題已被標幟
1 回覆
13039 瀏覽次數

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

相關帖文 回覆 瀏覽次數 活動
0
6月 24
1820
1
3月 15
13607
6
10月 21
19010
4
10月 20
5370
2
3月 16
4160