How to set default url variable for initial page load

Discussion in 'Programming' started by unitedlocalbands, Jul 27, 2007.

  1. #1
    I would like to set some default variables for a couple of pages on my site.

    Right now I just put the variable at the end of the link... like:

    http://www.unitedlocalbands.com/user_band_logo.cfm?orderby=groupname

    But I would like for the url to look like this:

    http://www.unitedlocalbands.com/user_band_logo.cfm

    and still have the page load the same, meaning oderby is set equal to "groupname" when the page first loads.

    Then I have links on this page to reload it with the desiered variable.

    Like:

    http://www.unitedlocalbands.com/user_band_logo.cfm?orderby=city

    or

    http://www.unitedlocalbands.com/user_band_logo.cfm?orderby=state

    The problem I'm trying to aviod is the page loading with just the url and no variables defined like this:

    http://www.unitedlocalbands.com/user_band_logo.cfm

    causing the coldfusion server to kick out an error message saying "variable orderby in undefined"
     
    unitedlocalbands, Jul 27, 2007 IP
  2. unitedlocalbands

    unitedlocalbands Well-Known Member

    Messages:
    246
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    128
    #2
    Yeah, It just came to me a split second after I wrote this thread.

    So here is the answer....

    <cfparm name="url.firstletter" default="">

    Thanks anyway,

    James
     
    unitedlocalbands, Jul 27, 2007 IP