Skip to content

Instantly share code, notes, and snippets.

View FuzzicalLogic's full-sized avatar
🚖
Porting code from another repository...

Donald Atkinson FuzzicalLogic

🚖
Porting code from another repository...
View GitHub Profile
@FuzzicalLogic
FuzzicalLogic / setParentTemplate.snippet.php
Created September 13, 2012 06:18
MODx Revolution: Allows you to "nest" a MODx Revolution Template within another MODx Revolution Template. Requires the use of a Template Switcher plugin
<?php
// Requires an Template ID
if (empty($id))
return '';
else
{//Get the Template
$parent = $modx->getObject('modTemplate', $id);
// Must be a valid Template ID
if (empty($parent))
return '';