Skip to content

Instantly share code, notes, and snippets.

@EHLOVader
Forked from anonymous/gist:3706321
Created September 12, 2012 12:52
Show Gist options
  • Save EHLOVader/3706391 to your computer and use it in GitHub Desktop.
Save EHLOVader/3706391 to your computer and use it in GitHub Desktop.
Blog Post page
<? if ($post): ?>
<h2><?= h($post->title) ?></h2>
<p>
Published by <?= h($post->created_user_name) ?>
on <?= $post->published_date->format('%F') ?>
Comment(s): <?= $post->approved_comment_num ?>
</p>
<?= $post->content ?>
<? if(count($post->blogfiles) != 0) : ?>
<ul id="blogfiles" class="totalfiles_<?= (count($post->blogfiles)+1) ?>">
<? foreach($post->blogfiles as $num => $file) : ?>
<li id="blogfile_<?= ($num+1) ?>"><a href="<?= $file->getPath() ?>">Download Article</</li>
<? endforeach; ?>
</ul>
<? endif; ?>
<? else: ?>
<h2>Post not found</h2>
<? endif ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment