2018-04-02 08:29:19 +02:00
|
|
|
<ul>
|
2019-06-08 21:30:12 +02:00
|
|
|
<?php foreach($this->getHierarchy(null,true,null) as $parentId => $childIds): ?>
|
2018-04-02 08:29:19 +02:00
|
|
|
<li>
|
2019-06-08 21:30:12 +02:00
|
|
|
<?php
|
|
|
|
if ($this->getData(['page', $parentId, 'disable']) === false && $this->getUser('group') >= $this->getData(['page', $parentId, 'group']))
|
|
|
|
{ ?>
|
2018-10-23 21:23:05 +02:00
|
|
|
<a href="<?php echo helper::baseUrl() . $parentId; ?>"><?php echo $this->getData(['page', $parentId, 'title']); ?></a>
|
2019-06-08 21:30:12 +02:00
|
|
|
<?php
|
|
|
|
} else {
|
2019-06-09 15:41:36 +02:00
|
|
|
// page désactivée
|
2019-06-08 21:30:12 +02:00
|
|
|
echo $this->getData(['page', $parentId, 'title']);
|
|
|
|
} ?>
|
2018-04-02 08:29:19 +02:00
|
|
|
<ul>
|
|
|
|
<?php foreach($childIds as $childId): ?>
|
|
|
|
<li>
|
2019-06-08 22:18:10 +02:00
|
|
|
<!-- Sous-page -->
|
2019-06-08 21:30:12 +02:00
|
|
|
<?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 { ?>
|
2019-06-09 15:41:36 +02:00
|
|
|
<!-- page désactivée -->
|
2019-06-08 22:18:10 +02:00
|
|
|
<?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): ?>
|
2019-06-10 15:48:43 +02:00
|
|
|
<?php if($this->getData(['module',$childId,$articleId,'state']) === true) {?>
|
|
|
|
<li>
|
|
|
|
<a href="<?php echo helper::baseUrl() . $childId . '/' . $articleId;?>"><?php echo $article['title']; ?></a>
|
|
|
|
</li>
|
|
|
|
<?php } ?>
|
2019-06-08 22:18:10 +02:00
|
|
|
<?php endforeach;
|
|
|
|
} ?>
|
|
|
|
</ul>
|
2018-04-02 08:29:19 +02:00
|
|
|
</li>
|
|
|
|
<?php endforeach; ?>
|
2019-06-08 22:18:10 +02:00
|
|
|
<!-- ou articles d'un blog-->
|
|
|
|
|
2019-06-10 15:48:43 +02:00
|
|
|
<?php if ($this->getData(['page', $parentId, 'moduleId']) === 'blog' ) { ?>
|
2019-06-08 22:18:10 +02:00
|
|
|
<?php
|
|
|
|
foreach($this->getData(['module',$parentId]) as $articleId => $article): ?>
|
2019-06-10 15:48:43 +02:00
|
|
|
<?php if($this->getData(['module',$parentId,$articleId,'state']) === true) {?>
|
|
|
|
<li>
|
|
|
|
<a href="<?php echo helper::baseUrl() . $parentId. '/' . $articleId;?>"><?php echo $article['title']; ?></a>
|
|
|
|
</li>
|
|
|
|
<?php } ?>
|
2019-06-08 22:18:10 +02:00
|
|
|
<?php endforeach;
|
|
|
|
} ?>
|
2018-04-02 08:29:19 +02:00
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
<?php endforeach; ?>
|
|
|
|
</ul>
|