Fixed theme Bug to not show Draft Pages

This commit is contained in:
Alexander K 2016-05-28 08:56:58 -04:00
parent f5d481beab
commit 64a9f1e156

View File

@ -33,17 +33,20 @@
<!-- Links -->
<section>
<ul class="links">
<?php
$parents = $pagesParents[NO_PARENT_CHAR];
foreach($parents as $Parent) {
echo '<li>';
echo '<a href="'.$Parent->permalink().'">
<h3>'.$Parent->title().'</h3>
<p>'.$Parent->description().'</p>
</a>';
echo '</li>';
}
?>
<?php
$parents = $pagesParents[NO_PARENT_CHAR];
foreach($parents as $Parent) {
// Check if the parent is published
if( $Parent->published() )
{
echo '<li>';
echo '<a href="'.$Parent->permalink().'">
<h3>'.$Parent->title().'</h3>
<p>'.$Parent->description().'</p>
</a>';
echo '</li>';
}}
?>
</ul>
</section>
@ -93,4 +96,4 @@
<?php Theme::plugins('siteBodyEnd') ?>
</body>
</html>
</html>