in general, I would like to different include templates in different pages regarding to the top-menue page the current page is a child of. So if you have PA, PB and PC in TopNavi i want all pages under PA to <% include template_a %>, PB <% include template_b %>, etc.
My current approach is to have a GetTemplate() method in the page controller that returns the tempate name by checking the parent page id's. The problem in this is how to include the returned template.
<% include GetTemplate %> seems to do nothing and
<% include $GetTemplate %> displays exactly this line, at least containing the template name returned by GetTemplate().
Is there a possibility at all to include dynamically generated template names?
Or is the approach generally bad and tehre is another, better one?
Thanks a lot for any hint :)