6 users online. Create an account or sign in to join them.Users

Search

I’ve been doing a little reading about CSS Media queries, in conjunction with the markup library CSS and templates, and it got me thinking…

Is there a way to do similar with XSLT? Can certain templates and grid layouts be output dependant on browser widths for instance? Is there an extension somewhere that can output this kind of info into the param pool?

Potentially, but it would be unreliable. To get the value into the param pool you’d need to establish the browser using serverside technology and not client side. You would need to favour user agent sniffing (parsing the User-Agent string) over object detection (capability detection), which is inherently unreliable. So really this is a job for clientside code, once the page has been rendered and sent from Symphony.

@designermonkey - this might help you with Selecting browser specific elements with XSLT/PHP, http://documenta.rudolphina.org/cond-elem-demo.xml (see the second example).

It’s not a replacement for CSS Media Queries though. The great thing about using CSS Media queries is that adjusts on fly as the browser width and height change.

Cheers for that Brian!

My main thoughts were along the lines of paired down content for mobile devices that have less screen size than usual, and wouldn’t be able to expand.

I’ll have a look into that link, cheers…

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.2 or above
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.0 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details