XF 1.5 Is there a xen if not responsive

ibaker

Well-known member
I wish to make a template edit (non css template) that would need an "xen:if" expression to only apply if the screen is not in responsive view...in other words a type of "xen:if not responsive"...is there such an expression in XF?

The only way around it that I know of is to include the code in a div class and then in the css of the template include a display:none of the class in the responsive part of the css BUT that means the code still runs but just not displayed which is not what I want to happen.

Any thoughts or help is appreciated...thanks
 
Thanks Brogan, what I am trying to do is adapt the menu system, I will try and explain it.

The structure of it is that there is an off canvas menu containing both main menu and sub menu components only used when responsive is activated i.e. on mobile phones. Also the visitors menu is displayed not in the slide out menu but across the top of the mobile phone

The PC view i.e. non responsive view, displays the main menu plus the visitors menu down the side and the sub menu as is in XF default. This requires the off canvas slide out menu to be turned off.

I can do it with the css by using display:none and display:inline but it is getting very dirty. The navigation template basically has to have 2 lots of main menu divs and 2 lots of sub menu divs with the css turning things on and off depending on whether it is PC or Mobile view...very dirty plus two instances of all menus are being loaded which isn't very efficient.

It would be very simple if there was a xen:if so only one complete menu instance is loaded, which is the reason for the post
 
Back
Top Bottom