Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Simple if/elsif condition.. not working

Quote Reply
Simple if/elsif condition.. not working
For the life of it, I can't figure out where I am making mistake in here. As when I use code like <%Rating%> in detailed.html it works just fine and displays rating value, however when I use below code, it produces no output - and I am not able to figure out what could be wrong, any idea?

Code:
<%if Rating eq 0%><img alt="<%Rating%>" src="http://www.softwaredevil.com/images/main/star00.gif">
<%elsif Rating gt '0' and lt '1'%><img alt="<%Rating%>" src="http://www.softwaredevil.com/images/main/star00.gif">

<%elsif Rating eq '1'%><img alt="<%Rating%>" src="http://www.softwaredevil.com/images/main/star05.gif">
<%elsif Rating gt '1' and lt '2'%><img alt="<%Rating%>" src="http://www.softwaredevil.com/images/main/star05.gif">

<%elsif Rating eq '2'%><img alt="<%Rating%>" src=".http://www.softwaredevil.com/images/main/star1.gif">
<%elsif Rating gt '2' and lt '3'%><img alt="<%Rating%>" src="http://www.softwaredevil.com/images/main/star1.gif">

<%elsif Rating eq '3'%><img alt="<%Rating%>" src="http://www.softwaredevil.com/images/main/star15.gif">
<%elsif Rating gt '3' and lt '4'%><img alt="<%Rating%>" src="http://www.softwaredevil.com/images/main/star15.gif">

<%elsif Rating eq '4'%><img alt="<%Rating%>" src="http://www.softwaredevil.com/images/main/star2.gif">
<%elsif Rating gt '4' and lt '5'%><img alt="<%Rating%>" src="http://www.softwaredevil.com/images/main/star2.gif">

<%elsif Rating eq '5'%><img alt="<%Rating%>" src="http://www.softwaredevil.com/images/main/star25.gif">
<%elsif Rating gt '5' and lt '6'%><img alt="<%Rating%>" src="http://www.softwaredevil.com/images/main/star25.gif">

<%elsif Rating eq '6'%><img alt="<%Rating%>" src="http://www.softwaredevil.com/images/main/star3.gif">
<%elsif Rating gt '6' and lt '7'%><img alt="<%Rating%>" src="http://www.softwaredevil.com/images/main/star3.gif">

<%elsif Rating eq '7'%><img alt="<%Rating%>" src="http://www.softwaredevil.com/images/main/star35.gif">
<%elsif Rating gt '7' and lt '8'%><img alt="<%Rating%>" src="http://www.softwaredevil.com/images/main/star35.gif">

<%elsif Rating eq '8'%><img alt="<%Rating%>" src="http://www.softwaredevil.com/images/main/star04.gif">
<%elsif Rating gt '8' and lt '9'%><img alt="<%Rating%>" src="http://www.softwaredevil.com/images/main/star45.gif">

<%elsif Rating eq '9'%><img alt="<%Rating%>" src="http://www.softwaredevil.com/images/main/star45.gif">
<%elsif Rating gt '9' and lt '10'%><img alt="<%Rating%>" src="http://www.softwaredevil.com/images/main/star45.gif">

<%elsif Rating eq '10'%><img alt="<%Rating%>" src="http://www.softwaredevil.com/images/main/star5.gif">
<%endif%>

The same code is working just fine with reviews (using Review_Rating)..

Thanks for the help

Vishal
-------------------------------------------------------
Subject Author Views Date
Thread Simple if/elsif condition.. not working VishalT 1881 Aug 20, 2009, 12:13 PM
Thread Re: [SWDevil.Com] Simple if/elsif condition.. not working
brewt 1792 Aug 20, 2009, 1:06 PM
Post Re: [brewt] Simple if/elsif condition.. not working
VishalT 1784 Aug 20, 2009, 1:22 PM