Kombinierte Ansicht Flache Ansicht Baumansicht
Threads [ Zurück | Nächste ]
toggle
Dave Weitzel
detecting display size for Responsive theme designs
25. September 2012 08:37
Antwort

Dave Weitzel

Rang: Regular Member

Nachrichten: 207

Eintrittsdatum: 18. November 2009

Neue Beiträge

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
Anonym
RE: detecting display size for Responsive theme designs
25. September 2012 17:38
Antwort

Anonym

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.

Participate in the State of Liferay Community 2017. Help the community and even win some prizes!