Pages

Wednesday, March 6, 2013

Get template id from template name modx revolution

$templateObj = $modx->resource->getOne('Template',array('templatename'=>'Template_Name'));
$templateid = $templateObj->get('id');

Here, in this code "Template_Name" is template name from which user want to get template id.

No comments:

Post a Comment