if (!defined('APPLICATION')) { return; } ?> <h1 class="H HomepageTitle"><?php echo $this->data('Title'); ?> </h1> <div class="P PageDescription"><?php echo $this->Description(); ?> </div> <?php $this->fireEvent('AfterDescription'); $this->fireEvent('AfterPageTitle'); $Categories = CategoryModel::MakeTree($this->data('Categories'), $this->data('Category', null)); if (c('Vanilla.Categories.DoHeadings')) { foreach ($Categories as $Category) { ?> <div id="CategoryGroup-<?php echo $Category['UrlCode']; ?> " class="CategoryGroup <?php echo val('CssClass', $Category); ?> "> <h2 class="H"><?php echo htmlspecialchars($Category['Name']); ?> </h2>
<?php $Category = $this->data('Category'); if (!$Category) { return; } $SubCategories = CategoryModel::MakeTree(CategoryModel::categories(), $Category); if (!$SubCategories) { return; } require_once $this->fetchViewLocation('helper_functions', 'categories', 'vanilla'); ?> <h2 class="ChildCategories-Title Hidden"><?php echo t('Child Categories'); ?> </h2> <ul class="DataList ChildCategoryList"> <?php foreach ($SubCategories as $Row) { if (!$Row['PermsDiscussionsView'] || $Row['Archived']) { continue; } $Row['Depth'] = 1; ?> <li id="Category_<?php echo $Row['CategoryID']; ?> " class="Item Category"> <div class="ItemContent Category"> <h3 class="CategoryName TitleWrap"><?php echo anchor(htmlspecialchars($Row['Name']), $Row['Url'], 'Title');
<?php $SubCategories = CategoryModel::MakeTree($this->Data('Category')); $SubCategories = array_pop($SubCategories); if (!$SubCategories || empty($SubCategories['Children'])) { return; } require_once $this->FetchViewLocation('helper_functions', 'categories', 'vanilla'); ?> <h2 class="ChildCategories-Title Hidden"><?php echo T('Child Categories'); ?> </h2> <ul class="DataList ChildCategoryList"> <?php foreach ($SubCategories['Children'] as $Row) { if (!$Row['PermsDiscussionsView']) { continue; } $Row['Depth'] = 1; ?> <li id="Category_<?php echo $Row['CategoryID']; ?> " class="Item Category"> <div class="ItemContent Category"> <?php echo Wrap(Anchor($Row['Name'], $Row['Url'], 'Title'), 'h3', array('class' => 'CategoryName TitleWrap')); ?> <?php
<?php if (!defined('APPLICATION')) { return; } ?> <h1 class="H HomepageTitle"><?php echo $this->Data('Title'); ?> </h1> <div class="P PageDescription"><?php echo $this->Description(); ?> </div> <?php $Categories = CategoryModel::MakeTree($this->Data('Categories'), $this->Data('Category', NULL)); if (C('Vanilla.Categories.DoHeadings')) { foreach ($Categories as $Category) { ?> <div id="CategoryGroup-<?php echo $Category['UrlCode']; ?> " class="CategoryGroup"> <h2 class="H"><?php echo htmlspecialchars($Category['Name']); ?> </h2> <?php WriteCategoryTable($Category['Children'], 2); ?> </div>