<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
p.msochpdefault, li.msochpdefault, div.msochpdefault
        {mso-style-name:msochpdefault;
        margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Calibri","sans-serif";}
span.emailstyle17
        {mso-style-name:emailstyle17;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="color:#1F497D">Actually, there are no query strings there.  The data sources are all shapefiles, it’s a case of “show me everything with one symbol” for each layer.  They are all displayed pretty much the same way.
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">But here’s the mapfile metadata with the itemquery parameters, if that helps…<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">                METADATA<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">                                'ows_title' 'Indices'<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">                                'ows_srs' 'EPSG:26919 EPSG:4326 EPSG:900913 EPSG:3857'<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">                                'ows_enable_request' '*'<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">                                'ows_onlineresource' 'http://www.geomoose.org'<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">                                'itemquery'         'itemquery.html'<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">                                'itemquery-filteritem' 'tilename'<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">                                'itemquery-filter'             '/.*[qstring].*/i'
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">                                'qstring_validation_pattern' '.'<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">                END<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Lime, Steve D (DNR) [mailto:Steve.Lime@state.mn.us]
<br>
<b>Sent:</b> Friday, July 06, 2012 12:18 AM<br>
<b>To:</b> Bistrais, Bob; mapserver-users@lists.osgeo.org<br>
<b>Subject:</b> RE: How to get layer name in an identify template?<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black">What do your query strings look like? - Steve<o:p></o:p></span></p>
<div>
<div class="MsoNormal" align="center" style="text-align:center"><span style="font-size:12.0pt;font-family:"Times New Roman","serif";color:black">
<hr size="2" width="100%" align="center">
</span></div>
<div id="divRpF812466">
<p class="MsoNormal" style="margin-bottom:12.0pt"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black">
<a href="mailto:mapserver-users-bounces@lists.osgeo.org">mapserver-users-bounces@lists.osgeo.org</a> [mapserver-users-bounces@lists.osgeo.org] on behalf of Bistrais, Bob [Bob.Bistrais@maine.gov]<br>
<b>Sent:</b> Thursday, July 05, 2012 2:01 PM<br>
<b>To:</b> <a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>
<b>Subject:</b> [mapserver-users] How to get layer name in an identify template?</span><span style="font-size:12.0pt;font-family:"Times New Roman","serif";color:black"><o:p></o:p></span></p>
</div>
<div>
<div>
<p class="MsoNormal"><span style="color:black">I am trying to set up a single template, which will format the results of an identify (query by point).  Many of the layers have the same item names, so I’d like to use the same template for those layers.   I have
 this working well, except that I’d like the layer name to appear at the top of each query result.  How can I put this in as a variable that MapServer can interpret?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black"> <o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black">Below is my sample code of the template.  I put [wms_title] in as the variable for the layer name, but this doesn’t work:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black"> <o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black"><!-- MapServer Template --><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black"><hr/><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black"><tr><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black"><td colspan="2"><b>[wms_title]</b></td>       
</span><span style="font-family:Wingdings;color:black">ß</span><span style="color:black">-I want to replace [wms_title] with something that will return the layer name<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black"></tr><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black"><tr><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black"><td align="left"><b>Tile:</b> &nbsp [tilename]</td><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black"></tr><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black"><tr><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black"><td align="left"><b>Download Image:</b> &nbsp <a href=[LINK]>[LINK]</a></td><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black"></tr><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black"> <o:p></o:p></span></p>
</div>
</div>
</div>
</div>
</div>
</body>
</html>