call a module via udt
Posted: Mon Jan 28, 2013 10:14 am
Hello There, I would like to encapsulate some logic into udt. so I can keep a simple template.
I have a condition. If the condition is true I want to show an image
If not i want to show a module (showtime)
So i have this
$gCms = cmsms();
$contentops = $gCms->GetContentOperations();
$content_obj = $contentops->getContentObject();
if (!is_object($content_obj)) {return;}
if (file_exists($content_obj->Alias().".jpg")) {
$smarty->assign('picture', '<img src="tick.jpg" alt="" />');
} else {
//Here I need help
//Call module Showtime with parameter 1 in smarty
//{Showtime show='1'}
}
So bottom line is, I don't know how to call a module within an udt
Thanks
Nikolas
I have a condition. If the condition is true I want to show an image
If not i want to show a module (showtime)
So i have this
$gCms = cmsms();
$contentops = $gCms->GetContentOperations();
$content_obj = $contentops->getContentObject();
if (!is_object($content_obj)) {return;}
if (file_exists($content_obj->Alias().".jpg")) {
$smarty->assign('picture', '<img src="tick.jpg" alt="" />');
} else {
//Here I need help
//Call module Showtime with parameter 1 in smarty
//{Showtime show='1'}
}
So bottom line is, I don't know how to call a module within an udt
Thanks
Nikolas