Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#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 tbonfort, 15 years ago

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.

Yeah, that would work, great suggestion. Feel free to add. I'd rather have multiple people work on code sections anyway. More eyes the better!

comment:2 by tbonfort, 15 years ago

Component: MapServer CGIMapServer Documentation

committed in r9279, off to docs

comment:3 by tbonfort, 15 years ago

Resolution: fixed
Status: newclosed

doc updated in r9280

comment:4 by tamas, 15 years ago

Fixed msApplyDefaultSubstitutions causing the process to hang in an infinite loop in r9282

Note: See TracTickets for help on using tickets.