ACC SHELL
{** BLOCK preview **}
{if ($oid)}
{a parent=$G.objects.gallery->loadOne($oid)}
{if ($parent)}
{a objects=$parent->children()}
{a objects=$objects.0}
<h4>{'module-name'|l:'gallery'}</h4>
<? $this->__url = LPATH . __('get-url', 'gallery') . $this->__parent->url; ?>
{a objects=$objects->slice(0, 5)}
{foreach item=thumbnail from=$objects}
{if (!$thumbnail->g)}
{$View::common('thumbnail', $thumbnail->image, $thumbnail->title, $url, null, null, $object->id)}
{/if}
{/foreach}
<div style="clear: both;"></div>
{/if}
{/if}
{** BLOCK detail **}
{ax object=$G.result.object}
<div class="text">
{$object->text}
</div>
{foreach item=thumbnail from=$G.result.objects.tree}
{if (!$thumbnail->g)}
{$View::common('thumbnail', $thumbnail, $thumbnail->title, false)}
{/if}
{/foreach}
{** BLOCK list-group **}
{a url='get-url'|l:$this->group}{a url=#lpath#|cat:$url}
<a class="title" href="{$url}{$object->url|h}">{$object->title|h}</a>
<?
$thumbnail_count = $this->__object->module()->get('list-group-thumbnail-count', 5);
if ($thumbnail_count)
{
$thumbnails = $this->__object->load(Fand(Feq('pid', $this->__object->oid), Feq('group', false)), null, $thumbnail_count);
echo '<div class="thumbnails">';
foreach ($thumbnails as $thumbnail)
echo View::common('thumbnail', $thumbnail->image, $thumbnail->title, $this->__url . $this->__object->url);
echo '</div>';
echo '<div style="clear: both;"></div>';
}
?>
{** BLOCK list-groups **}
{foreach item=object from=$G.result.objects.tree}
{if ($object->g)}
{template __file='::list-group' object=$object}
{/if}
{/foreach}
{** BLOCK list **}
{*ax count=5}
{sub name='list-sub'}
<div class="items level{$level}">
{foreach item=object from=$objects}
{if ($object->g)}
<div class="item">
<a class="title" href="{$url}{$object->url|h}">{$object->title|h}</a>
{counter assign=i start=0}
{foreach item=thumbnail from=$object->x.tree}
{if (($i < $count) && (!$thumbnail->g))}
{$View::common('thumbnail', $thumbnail, $thumbnail->title, false)}
{counter assign=i}
{/if}
{/foreach}
{subuse name='list-sub' objects=$object->x.tree level=$level+1}
</div>
{/if}
{/foreach}
</div>
{/sub}
{subuse name='list-sub' objects=$G.result.objects.tree level=0*}
{template __file='::list-groups'}
{** BLOCK @get **}
{a result=$G.invocation->dispatch()}
{$View::title()}
{$View::common('messages-output')}
{template __file='::detail'}
{template __file='::list'}
{** ENDBLOCK **}
ACC SHELL 2018