
<div class="artColumn col-md-8">
<h3>Editions</h3>
<article class="thumbList1">
[[!getResources?
&parents=`[[*artists and poets]]`
&depth=`0`
&tpl=`boundEditionRow`
&includeContent=`1`
&limit=`10`
&includeTVs=`1`
&processTVs=`1`
&showHidden=`1`
&sortby=`menuindex`
&sortdir=`ASC`
]]
</article>
<h3>Paintings</h3>
<article class="thumbList2">
[[!getResources?
&parents=`[[*single works]]`
&depth=`0`
&tpl=`boundEditionRow`
&includeContent=`1`
&limit=`10`
&includeTVs=`1`
&processTVs=`1`
&showHidden=`1`
&sortby=`menuindex`
&sortdir=`ASC`
]]
</article>
</div>
<div class="artColumn col-md-8"> [[!GetStuff? &parentTv=`artists and poets` &heading=`Editions` &class=`thumblist1` ]] [[!GetStuff? &parentTv=`single works` &heading=`Paintings` &class=`thumblist2` ]] </div>
<?php
/* GetStuff snippet */
$parentTv = $modx->getOption('parentTv', $scriptProperties, 'Missing Parent TV');
$heading = $modx->getOption('heading', $scriptProperties, 'Missing Heading');
$class = $modx->getOption('class', $scriptProperties, 'Missing class');
$parentTvValue = $modx->resource->getTVValue($parentTv);
$count = $modx->getCount('modResource', array('parent' => $parentTvValue));
if (!$count) { /* nothing to show */
return '';
}
$fields = array(
'parents' => $parentTvValue,
'depth' => '0',
'tpl' => 'boundEditionRow',
'includeContent' => '1',
'limit' => '10',
'includeTVs' => '1',
'processTVs' => '1',
'showHidden' => '1',
'sortby' => 'menuindex',
'sortdir' => 'ASC',
);
$output = "\n<h3>" . $heading . '</h3>' .
' <article class="' . $class . '">' . "\n";
$output .= $modx->runSnippet('getResources', $fields);
$output .= "\n <article>\n";
return $output;
<?php
/* GetStuff snippet */
$parentTv = $modx->getOption('parentTv', $scriptProperties, 'Missing Parent TV');
$heading = $modx->getOption('heading', $scriptProperties, 'Missing Heading');
$class = $modx->getOption('class', $scriptProperties, 'Missing class');
$parentTvValue = $modx->resource->getTVValue($parentTv);
if (!$parentTvValue) { return ''; } /* nothing to show */
$fields = array(
'parents' => $parentTvValue,
'depth' => '0',
'tpl' => 'boundEditionRow',
'includeContent' => '1',
'limit' => '20',
'includeTVs' => '1',
'processTVs' => '1',
'showHidden' => '1',
'sortby' => 'menuindex',
'sortdir' => 'ASC',
);
$output = "\n<h3>" . $heading . '</h3>' .
' <article class="' . $class . '">' . "\n";
$output .= $modx->runSnippet('getResources', $fields);
$output .= "\n </article>\n";
return $output;