[9.1.09] sitemap revu avec les articles de blog

This commit is contained in:
fredtempez 2019-06-08 22:18:10 +02:00
parent 682b5f72ba
commit 609fc0009e
1 changed files with 26 additions and 1 deletions

View File

@ -12,13 +12,38 @@
<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']); }?>
<?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; ?>