cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Askild Aaberg Olsen <>
Subject Re: How to extend and use the BrowserSelector
Date Fri, 25 Feb 2005 12:41:16 GMT
Kjell Arne Brødreskift wrote:

> Hello all, this probably is a simple question with an obvious answer 
> to you, but I hope someone would take a little time and point me in 
> the right direction here.
> I have read about and tried the excisting BrowserSelector in Cocoon, 
> but just getting the name of the browser isn't enough. Browsers also 
> vary with versions and platforms. What I want is to match on the 
> user-agent in the sitemap. And then use selectors to point each 
> browser to the right stylesheet.
> And the question is: Is this the right way to go about this, and how 
> can you make this apply to every page on the site without interferring 
> with the rest of the sitemap?
> Kjell Arne
You should be able to configure this in the map:selectors/map:selector 
part of the sitemap. The browserselector matches the *first* occurrence 
in the <browser>-list where the useragent-attribute is contained within 
the UserAgent-header field from the browser.

A clever set of values and ordering would accomplish this.

Another solution would be to use the HeaderSelector directly with the 
UserAgent-field, or use flowscript.

Askild Aaberg Olsen

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message