-
-
Save kinglozzer/3f4861efd6b9f54401b6763fc9a9a0e8 to your computer and use it in GitHub Desktop.
This file contains 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 | |
public static function ShortCodeItemBlocks($arguments, $content = null, $parser = null, $tagname) { | |
$page = Controller::curr()->data(); | |
$itemBlocks = $page->ItemBlocks(); | |
if (isset($arguments['classgroup'])) { | |
$itemBlocks = $itemBlocks->filter('ClassGroup', $arguments['classgroup']); | |
} | |
$data = ArrayData::create(array( | |
'ItemBlocks' => $itemBlocks, | |
'Size' => (isset($arguments['size']) ? $arguments['size'] : null, | |
'CC' => (isset($arguments['customclass']) ? $arguments['customclass'] : null | |
)); | |
return $data->renderWith(array('ItemBlocks')); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment