Community mailing list archives

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

by André P. <> - 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!

2015-11-08 3:03 GMT+00:00 Kristian Koci <>:
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

Post to:

 André Paramés 
m  +351 939 158 257
 LISBOA | Avenida das Túlipas, nº 6, 13º A/B  1495-161 Algés