Created
May 29, 2013 13:20
-
-
Save sonicpunk/5670209 to your computer and use it in GitHub Desktop.
MODX Snippet. According to the given template ID you can include or exclude a specific HTML chunk.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//[[checkTemplate? &templateID=`1` &tpl=`bxsliderjs`]] | |
<?php | |
$output=''; | |
$template=$modx->resource->get('template'); | |
if($exclude!=1){ | |
if($template==$templateID){ | |
$output.=$modx->getChunk($tpl); | |
}; | |
} else if($exclude==1){ | |
if($template!=$templateID){ | |
$output.=$modx->getChunk($tpl); | |
}; | |
} | |
return $output; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment