show learn footer for posts only

This commit is contained in:
Alex Grintsvayg 2016-07-14 09:47:20 -04:00
parent b9e733006c
commit f5a9d87452
2 changed files with 8 additions and 1 deletions

View file

@ -168,6 +168,11 @@ class Post
return $this->postType == 'news';
}
public function hasLearnFooter()
{
return $this->postType == 'news';
}
public function getAuthorName()
{
switch(strtolower($this->author))

View file

@ -27,7 +27,9 @@
<?php endif ?>
</section>
<?php echo View::render('nav/_learnFooter', ['isDark' => false]) ?>
<?php if ($post->hasLearnFooter()): ?>
<?php echo View::render('nav/_learnFooter', ['isDark' => false]) ?>
<?php endif ?>
<?php if ($post->hasAuthor()): ?>
<?php echo View::render('content/_postAuthor', ['post' => $post]) ?>