I understand how to make content invisible using CSS so that you can hide it at certain breakpoints. The only drawback here is that the invisible content is nonetheless loaded which over a 3G connection to a small smartphone is not necessarily a good idea.
Is there some way to making breakpoint information available on the server so that you can prevent the display of a region (for example), or change the vertical order of the display, depending on the width of the screen?
There seems to be somekind of initiative to incorporate this in D8 and I would be interested to know your opinion about the Panel Breakpoints module.
Many thanks

Comments

fubhy’s picture

Status: Active » Fixed

Breakpoints are front-end and there is no hack-free solution to make this work in a way that would make sense. There is a concept called RESS from LukeW.. Read more about that here: http://www.lukew.com/ff/entry.asp?1392

I am not going to explain further how and why server side breakpoints don't work (and why it's a bad idea in general). But there are plenty of blog posts on this topic and I am sure you can find them on Google quite easily. The module you linked conceptually depends on JS / AJAX which will cause various other issues if you try it that way. My advise: Don't. Responsiveness is something that requires effort and precaution as well as proper content and design strategies. It's a whole, complex methodology and in general, *hiding* stuff entirely from mobile devices just because they would otherwise look funny is generally an indicator that either, the content is redundant (in which case you should not render it on any device at all) or, that your content strategy is flawed or the component you are trying to hide is badly designed. Think 'mobile first' and then build your design up from that. Not the other way round.

That being said, in some case RESS is the solution to your problems. But the module you linked and the concept that one advertises is moving into a potentially dangerous and (to my mind) absolutely wrong approach.

joel_guesclin’s picture

Thank you very much for taking so much time to explain all this, I really much appreciate it as I am very new to these technologies.
In general, I agree very strongly with everything you have said about using the right technology for the right job.
But perhaps I should explain why I am thinking about these specific questions, I have two use cases which seem sensible to me but maybe are not:
1) Menu system: I can see that the way menus work on phones/tablets and workstations is not the same. So, I would like to have my "main menu" in the usual place, just below the page title (ie the site name), but have it appear on a mobile phone as a "pull-down" menu above the page title. I could not think of any way of doing this other than hiding and displaying blocks.
2) "Unwanted content". On the workstation view I have some advertising for books and such with a lot of graphics, which I don't want to display on the smartphone layout in order to minimise bandwidth. How to do this, or is it even sensible?
Many thanks again

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.