Modifying template to be used from within a module [CMSMS 1.9]
Posted: Mon Dec 06, 2010 1:32 pm
Hi all,
I'm writing modules (based off the Skeleton module) and I am trying to make it use different templates based on the flow of the module program logic. I'm running the 1.9 version of CMSMS.
Based on the thread in:
http://forum.cmsmadesimple.org/index.ph ... 721.0.html
it looks like I would have to use the returnid to modify the template. Is there a way from within a module to choose the template the final result should be put into? (preferably by using template names instead of obscure IDs).
The current module code is not specifying a template so it's using the same template as the default page, which in most circumstances is OK, but for some parts of the module I want a different template to be used (one optimized for printing information).
So the module for example registered the paths:
/printer/info -> action.info.php
/printer/info/printable -> action.info.php
The last one should use a different template.
Is this possible?
Grtz,
Jeroen Egmond
I'm writing modules (based off the Skeleton module) and I am trying to make it use different templates based on the flow of the module program logic. I'm running the 1.9 version of CMSMS.
Based on the thread in:
http://forum.cmsmadesimple.org/index.ph ... 721.0.html
it looks like I would have to use the returnid to modify the template. Is there a way from within a module to choose the template the final result should be put into? (preferably by using template names instead of obscure IDs).
The current module code is not specifying a template so it's using the same template as the default page, which in most circumstances is OK, but for some parts of the module I want a different template to be used (one optimized for printing information).
So the module for example registered the paths:
/printer/info -> action.info.php
/printer/info/printable -> action.info.php
The last one should use a different template.
Is this possible?
Grtz,
Jeroen Egmond