Plugin

Archived
Forum
(read-only)

Which browser

ExpressionEngine 2

Back to this add-on's main page
View Other Add-ons From Siblify

     

Using Which_browser with Conditional IF

General

Glen Coulthard
Glen Coulthard

I am trying to use a conditional in order to include an image based on the browser version.

I downloaded Which_browser, but it isn’t working for me inside an IF construct. The which_browser tag by itself, however, returns the appropriate browser code (e.g., Firefox or IE9). Here is the code that I’m trying in my template.

{if exp:which_browser=="IE6" OR exp:which_browser=="IE5"}
   
<img src="blah.gif">
{if:else}
   
<img src="blah.png">
{/if} 

Any suggestions or alternatives?
Thanks for any assistance,
Glen