Showing different templates or sites to different visitors in Joomla |
Od Klas Berlič | |
This is one of the Joomla's hidden features - there is builtin JBrowser library in Joomla that detects browsers and their capabilities and by using it you can show different template or content to different user types. We are successfully using it on some of our sites to detect whether user/browser has javascript support (or is a robot) and redirect them later to appropriate site version with few simple lines of code:
$browser=new JBrowser;
We combine this with header redirection inside noscript tags to improve reliability for visitors that don't send their browser versions or use unknown ones. Other example uses of this library:
Joomla API documentation page for JBrowser:
If builtin Joomla library is not reliable or up to date enough, you can additionally improve reliability by using one of this scripts that get updated more regulary:
|