After seeing this post on SES URLs from Ray Camden, I noticed that the idea behind it was similar to what I was already using on this blog software. I didn't think it was all that incredible on it's own, buy maybe I was wrong. Anyway, here's the code I've been using in my application.cfm file:

<cfset urlstring = cgi.path_info>
<cfloop from="1" to=#ListLen(urlstring,"/")# index="i">
    <cfif i mod 2>
        <cfset paramName = "URL." & ListGetAt(urlstring,i,"/")>
    <cfelse>
        <cfparam name="#paramName#" default="#ListGetAt(urlstring,i,"/")#">
    </cfif>
</cfloop>

This is written for general ColdFusion use, not the Model-Glue environment, so there's no check for an event variable. It's not too much different, but I thought I'd go ahead and post it. Feel free to use it for your own purposes, but please give credit where it's due. Smile

Related posts:

  1. Dynamic Fraction Display For ColdFusion
  2. This Article Is About Search Engine Bots
  3. Back Home
  4. My Wife The Blogger
  5. Even In Victory

 Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

   
© 2011 Greg Nilsen Suffusion theme by Sayontan Sinha