Is it possible to programmatically set the master page for a site based on the custom template used to create said site?
I created some custom templates with custom page layout and webparts, they are called News, Projects and Products. I saved them as site templates, and now, when i create a new site using those templates i want to set a different master page to each of them.
I've created a EventReveiver with a WebProvisioned method that gets the webTemplateId and sets the masterpage,l the thing is, the webtemplateid return the base template, which is STS#0.
Is there a way to identify the Custom Template I used to create my site and apply the master page accordingly?