Hi Chris,
That's the problem, there's no way to get the user selected template from the dijit. The print dijit has a templates property which contains an array of all available templates, and within that array I can access the layout of each template as you suggest, and in fact I am doing this in order to set title, subtitle, author, etc, on each template prior to printing. What I'm trying to do is detect which template the user selected for printing. Here's what's happening:
- user chooses a template
- the print dijit does a POST to the ExportWebMap task on my server
- the post contains a WebMapAsJSON object which does contain the name of the selected template (I can see this in Firebug but cannot access it programmatically via JavaScript)
- the server creates the output map and returns the url so the user can get the resulting map
.....so, it seems like the only place the selected template is available is in the POST to the server, but this isn't helpful because we cannot access POST data via JavaScript.
I've tried accessing the evt object for the 'print-start' and 'print-complete' events but it only includes the target (the print dijit) and the result object (url to the printed map).
I think I'm out of luck.