Community mailing list archives

community@mail.odoo.com

Re: Change page when it's not home - website module

by André P. <app@thinkopen.solutions> - 11/09/2015 04:56:46
Add this to your main layout header:

<t t-set="is_home" t-value="(request.httprequest.path == '/page/homepage')"/>

Then you can use it with normal qweb, like:

<t t-if="is_home">
  Only shown at home!
</t>

2015-11-08 3:03 GMT+00:00 Kristian Koci <kristian.koci@gmail.com>:
Hi, I'm trying to achieve something like this, for example, take this homepage:


If you go then to one of the menu sections, like this one for example:


You can see, the main menu changed, like for example in wordpress you can do this:

if is_home();
    // do your logic;

Of course that is php, but it is just to illustrate what I want to achieve, there are methods for Django, Flask thru template tags, etc.

Is there a way to acheive this on website module only by changing/editing the main layout?

Thanks in advance!

--
Kristian Koci
Linux User #582221

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe




--
 André Paramés 
ODOO CONSULTANT
m  +351 939 158 257
e    app@thinkopen.solutions
 
 LISBOA | Avenida das Túlipas, nº 6, 13º A/B  1495-161 Algés