Файл: concrete5.7.5.6/concrete/blocks/topic_list/view.php
Строк: 21
<?php defined('C5_EXECUTE') or die("Access Denied."); ?>
<div class="ccm-block-topic-list-wrapper">
<div class="ccm-block-topic-list-header">
<h5><?php echo h($title); ?></h5>
</div>
<?php
if ($mode == 'S' && is_object($tree)) {
$node = $tree->getRootTreeNodeObject();
$node->populateChildren();
if (is_object($node)) {
if (!isset($selectedTopicID)) {
$selectedTopicID = null;
}
$walk = function ($node) use (&$walk, &$view, $selectedTopicID) {
?><ul class="ccm-block-topic-list-list"><?php
foreach ($node->getChildNodes() as $topic) {
if ($topic instanceof ConcreteCoreTreeNodeTypeTopicCategory) {
?><li><?php echo $topic->getTreeNodeDisplayName(); ?></li>
<?php
} else {
?><li><a href="<?php echo $view->controller->getTopicLink($topic); ?>" <?php
if (isset($selectedTopicID) && $selectedTopicID == $topic->getTreeNodeID()) {
?> class="ccm-block-topic-list-topic-selected"<?php
}
?>><?php echo $topic->getTreeNodeDisplayName(); ?></a></li><?php
}
$walk($topic);
}
?></ul><?php
};
$walk($node);
}
}
if ($mode == 'P') {
if (count($topics)) {
?><ul class="ccm-block-topic-list-page-topics"><?php
foreach ($topics as $topic) {
?><li><a href="<?php echo $view->controller->getTopicLink($topic); ?>"><?php echo $topic->getTreeNodeDisplayName(); ?></a></li><?php
}
?></ul><?php
} else {
echo t('No topics.');
}
}
?>
</div>