I'm rewriting my slideshow code in preperation for releasing it publicly.
I wondered if some of you might have input as to how to rewrite this snippet
a little more elegantly:
<cfset VARIABLES.totalslides = 10>
<cfset URL.slide = 4>
<cfif URL.slide EQ 1>
<cfset VARIABLES.prev = VARIABLES.totalslides>
<cfset VARIABLES.next = 2>
<cfelseif slide EQ VARIABLES.totalslides>
<cfset VARIABLES.prev = VARIABLES.totalslides - 1>
<cfset VARIABLES.next = 1>
<cfelse>
<cfset VARIABLES.prev = slide - 1>
<cfset VARIABLES.next = slide + 1>
</cfif>
I feel as if I should be able to condense this quite a bit, but I'm not sure
how to go about it. The frist two variables are being set dynamically by the
way.
<!----------------//------
andy matthews
web developer
ICGLink, Inc.
[EMAIL PROTECTED]
615.370.1530 x737
--------------//--------->
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:238424
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54