Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Dave Weitzel
detecting display size for Responsive theme designs
September 25, 2012 8:37 AM
Answer

Dave Weitzel

Rank: Regular Member

Posts: 186

Join Date: November 18, 2009

Recent Posts

I am converting some of our older themes to be responsive which is no small task.
however it would be really helpful if I could detect the size (eg <960 or < 480 ) inside the theme as well as through CSS so certain elements can be recoded.

Is there anyway that can be achieved?

realated to this I want to pass variable to the #breadcrumbs() velocity variable so they get processed by the liferay-ui taglib properly (showGuestGroup=false for instance) but cannot work out the right syntax to do this (if it is possible).

Thanks
Anonymous
RE: detecting display size for Responsive theme designs
September 25, 2012 5:38 PM
Answer

Anonymous

Hey Dave,

You can detect the size through native browser support for media-queries through CSS. I found this great article about it here: http://css-tricks.com/css-media-queries

About the "#breadcrumbs()" it's a velocity macro, you may want to manually embed the breadcrumbs portlet onto the page and pass in the paramaters through that.