[mapserver-users] record element in query header

Daniel Morissette dmorissette at mapgears.com
Wed Apr 7 14:16:44 EDT 2010


Steve.Toutant at inspq.qc.ca wrote:
> 
> If I put [provincename] in the template I got the value, per example
> In the Template
> [lrn]: [provincename] - [elementname]<br>
> 
> The result is:
> 1: Québec - blabla 1
> 2: Québec - blabla 2
> 3: Québec - blabla 3
> 
> But I don't want to put it in the template since the same information 
> will be repeated.
> thanks for your help!

I'm not exactly sure if a field name should be supported in the header 
template, but based on a quick browse of the code there are two other 
ways you could possibly pass the information (depending on what you have 
on the client side):

1- You can use parameters from the URL in a template tag. e.g. if you 
pass myprov=Quebec in the URL then you should be able to use [myprov] in 
your template.

2- You can reference layer-level metadata in query templates using 
[metadata_...]

(Those are untested hints based on a quick browse of the source)

Daniel
-- 
Daniel Morissette
http://www.mapgears.com/


More information about the mapserver-users mailing list