ZwiiCMS/core/module/sitemap/view/index/index.php

50 lines
1.8 KiB
PHP
Executable File

<ul>
<?php foreach($this->getHierarchy(null,true,null) as $parentId => $childIds): ?>
<li>
<?php
if ($this->getData(['page', $parentId, 'disable']) === false && $this->getUser('group') >= $this->getData(['page', $parentId, 'group']))
{ ?>
<a href="<?php echo helper::baseUrl() . $parentId; ?>"><?php echo $this->getData(['page', $parentId, 'title']); ?></a>
<?php
} else {
echo $this->getData(['page', $parentId, 'title']);
} ?>
<ul>
<?php foreach($childIds as $childId): ?>
<li>
<!-- Sous-page -->
<?php if ($this->getData(['page', $childId, 'disable']) === false && $this->getUser('group') >= $this->getData(['page', $parentId, 'group']))
{ ?>
<a href="<?php echo helper::baseUrl() . $childId; ?>"><?php echo $this->getData(['page', $childId, 'title']); ?></a>
<?php } else { ?>
<?php echo $this->getData(['page', $childId, 'title']); }?>
<!-- articles d'une sous-page blog-->
<ul>
<?php if ($this->getData(['page', $childId, 'moduleId']) === 'blog') { ?>
<?php
foreach($this->getData(['module',$childId]) as $articleId => $article): ?>
<li>
<a href="<?php echo helper::baseUrl() . $article['title'];?>"><?php echo $article['title']; ?></a>
</li>
<?php endforeach;
} ?>
</ul>
<!-- -->
</li>
<?php endforeach; ?>
<!-- ou articles d'un blog-->
<?php if ($this->getData(['page', $parentId, 'moduleId']) === 'blog') { ?>
<?php
foreach($this->getData(['module',$parentId]) as $articleId => $article): ?>
<li>
<a href="<?php echo helper::baseUrl() . $article['title'];?>"><?php echo $article['title']; ?></a>
</li>
<?php endforeach;
} ?>
</ul>
</li>
<?php endforeach; ?>
</ul>