[Solved]Template ids

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
jasnick
Power Poster
Power Poster
Posts: 695
Joined: Sat Jan 15, 2011 8:36 am

[Solved]Template ids

Post by jasnick »

How do I find out the id of a template?

Thanks
Last edited by jasnick on Mon Oct 07, 2013 11:31 am, edited 1 time in total.
User avatar
rotezecke
Power Poster
Power Poster
Posts: 411
Joined: Fri Apr 18, 2008 9:34 pm

Re: Template ids

Post 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 />';
jasnick
Power Poster
Power Poster
Posts: 695
Joined: Sat Jan 15, 2011 8:36 am

Re: Template ids

Post by jasnick »

Thanks rotezecke

I'm not very technical :-\ where do I put this?
User avatar
rotezecke
Power Poster
Power Poster
Posts: 411
Joined: Fri Apr 18, 2008 9:34 pm

Re: Template ids

Post 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
jasnick
Power Poster
Power Poster
Posts: 695
Joined: Sat Jan 15, 2011 8:36 am

Re: Template ids

Post by jasnick »

Great - thanks rotezecke ;D
Post Reply

Return to “CMSMS Core”