$settingsContainer = $this->getSettingsContainer();
$top_categories = $settingsContainer->getValue('top_categories');
<ul class="slides">
<?php if(is_array($top_categories)):
foreach($top_categories as $item):
$hierarchy = umiHierarchy::getInstance();
$page = $hierarchy->getElement($item->id);
$name = $item->getName();
$img = $page->getValue('header_pic');
$link = $hierarchy->getPathById($item->id);?>
<li>
<a href="<?php echo $link;?>"><img src="<?php echo $img;?>" alt="<?php echo $name;?>"/>
<span><span><?php echo $name;?></span></span></a>
</li>
<?php endforeach;?>
<?php endif;?>
</ul>
Добавить комментарий