#3108 closed enhancement (fixed)
default values for CGI substitutions
Reported by: | tbonfort | Owned by: | tbonfort |
---|---|---|---|
Priority: | normal | Milestone: | 5.6 release |
Component: | Documentation - MapServer | Version: | unspecified |
Severity: | normal | Keywords: | |
Cc: | sdlime dmorissette |
Description
I very often use url overloading with the %key% syntax in my mapfile as I find it's a powerful means of building custom maps. The problem with the current implementation is that the mapfile more often than less becomes unparsable if the url doesn't contain the key=value parameter.
Would it be complicated to modify the parser so that the mapfile can contain a default value for %key%, that would be applied if the url does not contain the "key" parameter?
Change History (4)
comment:1 by , 15 years ago
comment:2 by , 15 years ago
Component: | MapServer CGI → MapServer Documentation |
---|
committed in r9279, off to docs
comment:4 by , 15 years ago
Fixed msApplyDefaultSubstitutions causing the process to hang in an infinite loop in r9282
Note:
See TracTickets
for help on using tickets.
looking at the code, it seems like we could loop through metadata %key%_default_value entries to replace the value after having processed the url key/values, thus populating the strings with a default value if the entry was not found in the url.
does this seem reasonable? if so I can take this, unless if Steve wants to keep the hand on that part of the code.