Open tbonfort opened 12 years ago
Author: sdlime Date: 2004/10/28 - 15:29
Actually, instead of adding a new keyword I would prefer changing the behavior
of the EMPTY parameter. Treating it like a normal query template would
probably suffice, except that there would be no results to process. Both
filebased and URL templates could be supported then. Does that sound
reasonable?
This may be scope for 4.4, cc'ing Dan on that...
Steve
Author: dmorissette Date: 2004/10/28 - 15:49
No problem with me.
Author: silke@intevation.de Date: 2004/10/28 - 15:54
I am not sure whether this is a good idea. Currently the EMPTY parameter is
provided as URL to a html page. If we define EMPTY as template the new mapfile
will not be compatible with the old one. This is the reason why we introduced a
new paramter.
But if you don't want to introduce a new parameter this is OK for me as well.
Author: sdlime Date: 2004/10/28 - 17:02
Actually changing the EMPTY parameter this way (unless I'm missing something)
quite compatible. The CGI has always supported URL templates and they could be
static pages just as easily URLs that took on feature attributes. So a query
template of:
TEMPLATE 'http://www.google.com'
is perfectly valid.
Did you have additional template tags defined (eg. [foo]) or are the standard
template tags enough?
Steve
Author: silke@intevation.de Date: 2004/10/28 - 17:19
Oh, I didn't knew that URL templates are supported. If this is the case I don't
see any reason why EMPTY shouldn't just be enhanced to work as template as well.
The standard tags are absolutly sufficient.
Greetings, Silke
Author: sdlime Date: 2004/11/11 - 21:09
I've committed a fix for this just a few minutes ago. Both the ERROR and EMPTY
values are processed as URL templates so all normal substitutions will work
fine. I also added a new template tag [errmsg] (and [errmsg_esc]) so that the
current error stack can be passed along as part of the URL. Errors in the stack
are seperated by semi-colons. This obviously impacts only the CGI application.
So, you can do things like:
EMPTY 'http://www.yourserver.com/notfound.html?xy=[mapxy_esc]'
ERROR 'http://www.yourserver.com/error.html?error=[errmsg_esc]'
The [errmsg] will evaluate to an empty string if no errors are present in the
stack at the time of processing. Might be a helpful debugging tool. If the error
is in the mapfile parsing (so we can't get to ERROR or EMPTY) then the generic
MapServer error page is produced.
Silke, I've tested here and this is backwards compatible, but please check to
make sure it meets your needs. Marking fixed for now.
Steve
Author: sdlime Date: 2004/11/11 - 21:24
*** Bug 264 has been marked as a duplicate of this bug. ***
Author: silke@intevation.de Date: 2005/01/18 - 16:03
Sorry for my late reply. I thought that I already tested the new EMPTY tag but
it seems that it slipped through my attention.
In fact it seems that there has been a misunderstanding. What I am interested
for is to use the tags inside the HTML-page to give some additional information
to the user, something like the coordinates he clicked etc. Your patch just
enables me to get the values into the URL.
So I would again like to ask you to apply my patch to the UMN MapServer to
enhance by this functionality.
Thanks, Silke
Author: sdlime Date: 2005/01/18 - 16:59
I don't want to add another keyword and would propose extending EMPTY to allow
file templates as well...
Steve
Author: silke@intevation.de Date: 2005/01/18 - 18:28
This is OK with me as well. Shall I enhance the EMPTY keyword by adapting our
patch or will you bother to do this?
Silke
Author: sdlime Date: 2007/08/08 - 08:22 Still a good idea, but for 5.2 or beyond...
Steve
Author: sdlime Date: 2008/05/16 - 05:41 Silke: There was mention of a patch, did it ever go anywhere? I have time to address if you folks did more work along those lines. I realize it's been ages though.
Steve
Author: sdlime Date: 2008/06/25 - 07:51 Moving to future, I see no reason to spend time on it at this point.
Steve
Reporter: silke@intevation.de Date: 2004/10/28 - 14:35