Portal Engine Questions on portal engine and web parts.
Version 7.x > Portal Engine > Media Queries and Full Site View modes: 
User avatar
Kentico Legend
Kentico Legend
Brenden Kehren - 11/21/2013 2:18:28 PM
   
Media Queries and Full Site
Is it possible to redirect a user to the "full site" if you are using media queries? If so, how does one go about this? Kind of new to straight media queries.

User avatar
Member
Member
eagleag - 11/22/2013 1:30:30 AM
   
RE:Media Queries and Full Site
Hi,

I assume you are asking this beaacuse your site is responsive.

You watn to force the "full" site" it certain situations even if the user is on smatphone, tablet, correct?

I think easiest way to do that is to have all you media quries in one css file and use some logic to get the css.

That way, if you do not render the media quries css fiel the user will see the full site.

I hope this helps, if not can you be more specific as to the senario.

User avatar
Kentico Legend
Kentico Legend
Brenden Kehren - 11/22/2013 8:24:44 AM
   
RE:Media Queries and Full Site
Great idea.

I ended up implementing a custom method and macro that sets a session value and I add/remove the mobile stylesheet based that session value. The value is set by the existence of a URL parameter. For instance if you navigate to a page an click the "full site" link, it sets a url parameter which in turn sets the session value. You then navigate around the site and the URL parameter goes away until the "mobile site" link is clicked or they go to another site and navigate back to the site.

Works pretty slick and took less than 2 hours to design, implement and test.