0
votes

I'm building a PHP web-mapping application which has own mapserver. I have two templates for each layer - a template for guest and for logged user. My normal mapfile has a line like

TEMPLATE "templates/template.html"

But I have also a templates_guest folder which contains html templates for guests. How to change the 'TEMPLATE' parameter in runtime? If user is logged in, the TEMPLATE path should be templates_guest/template.html

1

1 Answers

0
votes

I'm fairly certain you could accomplish this via the query string.

I would recommend doing this via the url query string. Edit the template path in the query string like this:

...&map.web.template='templates_guest/template.html'... 

For more info look here in the MapServer Docs