Thanks to Steve Lime for finding the solution: Use the [cl] (current layer name) tag in my template. This does the trick. So, my template now looks like this:
<!-- MapServer Template --> <hr/> <tr> <td colspan="2"><b>[cl]</b> </tr> <tr> <td align="left"><b>Tile:</b>   [tilename]</td> </tr> <tr> <td align="left"><b>Download Image:</b>   <a href=[LINK]>[LINK]</a></td> </tr> <tr><td colspan="2"><hr></td></tr> ...Thanks again Steve! ________________________________ From: mapserver-users-boun...@lists.osgeo.org<mailto:mapserver-users-boun...@lists.osgeo.org> [mapserver-users-boun...@lists.osgeo.org] on behalf of Bistrais, Bob [bob.bistr...@maine.gov] Sent: Thursday, July 05, 2012 2:01 PM To: mapserver-users@lists.osgeo.org<mailto:mapserver-users@lists.osgeo.org> Subject: [mapserver-users] How to get layer name in an identify template? 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? 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: <!-- MapServer Template --> <hr/> <tr> <td colspan="2"><b>[wms_title]</b></td> <---I want to replace [wms_title] with something that will return the layer name </tr> <tr> <td align="left"><b>Tile:</b>   [tilename]</td> </tr> <tr> <td align="left"><b>Download Image:</b>   <a href=[LINK]>[LINK]</a></td> </tr>
_______________________________________________ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users