Page 1 of 1

[Solved]Template ids

Posted: Mon Oct 07, 2013 7:10 am
by jasnick
How do I find out the id of a template?

Thanks

Re: Template ids

Posted: Mon Oct 07, 2013 9:27 am
by rotezecke
UDT:

Code: Select all

$contentops = cmsms()->GetContentOperations();
$content_obj = $contentops->getContentObject();
echo 'Current content object is "'.$content_obj->Name().'"<br />';
echo 'which was created on '.$content_obj->GetCreationDate().'<br
/>';
echo 'its alias is "'.$content_obj->Alias().'"<br />';
echo 'its URL is "'.$content_obj->GetURL().'"<br />';
echo 'and its Title Attribute is "'.$content_obj->TitleAttribute().'"<br />';
echo 'and its Template ID is "'.$content_obj->TemplateId().'"<br />';

Re: Template ids

Posted: Mon Oct 07, 2013 9:43 am
by jasnick
Thanks rotezecke

I'm not very technical :-\ where do I put this?

Re: Template ids

Posted: Mon Oct 07, 2013 9:46 am
by rotezecke
in a user defined tag (UDT). the UDT can go in content block, global content or a template.
http://docs.cmsmadesimple.org/tags/user-defined-tags

Re: Template ids

Posted: Mon Oct 07, 2013 11:30 am
by jasnick
Great - thanks rotezecke ;D