Created
February 19, 2015 15:23
-
-
Save zurie/5a861413836350de1dca to your computer and use it in GitHub Desktop.
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
/* IfNotInList - Exclude Resources based on ID */ | |
[[!IfNotInList? &list=`48,51,52,53` &show=`<p>whatever I want</p>`]] | |
/* THE SNIPPET FOR MODX */ | |
<?php | |
/* IfNotInList snippet */ | |
$output = ""; | |
$listArray = explode(',', $scriptProperties['list']); | |
if (! in_array($modx->resource->get('id'), $listArray)) { | |
$output = $scriptProperties['show']; | |
} | |
return $output; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment