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
<?php | |
$id = isset($id) ? $id : $modx->resource->get('id'); | |
$pids = $modx->getParentIds($id, 100, array('context' => 'web')); | |
return count($pids); |
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
<?php | |
$c = $modx->newQuery('modResource'); | |
$resIds = array(); | |
/* we only want published and undeleted resources */ | |
$c->where(array( | |
'published' => true, | |
'deleted' => false, | |
'template'=>$templateID | |
)); | |
$resources = $modx->getCollection('modResource',$c); |
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); | |
}; |
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
//Snippet Call [[ifElseTemplate? &ifId=`1` &ifTpl=`kontakt_info` &elseId=`4` &elseTpl=`kontakt_person_info`]] | |
<?php | |
$output=''; | |
$template=$modx->resource->get('template'); | |
if($template==$ifId){ | |
$output.=$modx->getChunk($ifTpl); | |
}else if($template==$elseId){ | |
$output.=$modx->getChunk($elseTpl); |
NewerOlder