Vista combinada Visión Plana Vista de árbol
Discusiones [ Anterior | Siguiente ]
toggle
Dave Weitzel
detecting display size for Responsive theme designs
25 de septiembre de 2012 8:37
Respuesta

Dave Weitzel

Ranking: Regular Member

Mensajes: 207

Fecha de incorporación: 18 de noviembre de 2009

Mensajes recientes

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
Anónimo
RE: detecting display size for Responsive theme designs
25 de septiembre de 2012 17:38
Respuesta

Anónimo

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!