<table cellspacing='0' cellpadding='0' border='0' background='none' style='font-family:arial;font-size:10pt;color:rgb(51, 51, 51);background-color:rgb(255, 255, 255);width:100%;'><tr><td valign='top' style='font: inherit;'>I have one mapfile, let say, PACITAN.MAP, with two template files: PACITAN-TMPL.HTML and PACITAN-PRINT-TMPL.HTML. The former is the "primary" template for the normal web map display, while the latter has "cleaner look" for printing purpose (print page).<br><br>The print page (PACITAN-PRINT-TMPL.HTML) is called from the "primary" template page using JavaScript window.open() function. <br><br>When calling the print page, I can easily pass (and manipulate, if necessary) map-related information using CGI parameters. For example, layer information (ie which layers are selected) is passed with layers=[layers] CGI parameter, while extent information is passed with mapext=[minx], [miny], [maxx], [maxy] parameter.<br><br>The problem is: since
 the name of HTML template is hard-coded in the *.map file, I have to create another map file named PACITAN-PRINT.MAP, which is basically an exact copy of PACITAN.MAP, but using PACITAN-PRINT-TMPL.HTML as template&nbsp; (hard-coded in the mapfile, of course).<br><br>If I can dynamically change the name of the HTML template using CGI parameters, I don't have to use two versions of mapfile; I can just use one mapfile with two HTML templates and be done with it.<br><br>The problem is; is it possible to pass the name of the HTML template using CGI parameters? And if it is, then how? I have browsed MapServer documentations and this is all I found:<br><br>TEMPLATE has been removed, since the map_web_template syntax can be 
used to alter a template file. Simplifies security maintenance by only 
having to deal with this option in a single place. Note that the 
TEMPLATEPATTERN of the mapfile has to be used to enable this feature.<br><br>However, save the vague reference above, I just could not find any other explanation about the map_web_template syntax above. Is it a CGI parameter? Can I just use the map_web_template parameter in my url, to specify which template to use?<br><br>Many thanks,<br>-Kresh<br><br><br></td></tr></table><br>