Skip to content

Instantly share code, notes, and snippets.

@Cleanse
Created May 14, 2017 17:35
Show Gist options
  • Save Cleanse/5bf75bfe8a64465c3736d05f4c207cd9 to your computer and use it in GitHub Desktop.
Save Cleanse/5bf75bfe8a64465c3736d05f4c207cd9 to your computer and use it in GitHub Desktop.
title = "Article Post"
url = "/article/:slug"
layout = "basic"
description = "Viewing a single article post."
is_hidden = 0
[blogPost]
slug = "{{ :slug }}"
categoryPage = "article/category"
[forumEmbedTopic]
embedCode = "{{ :slug }}"
channelSlug = "article-comments"
memberPage = "forum/member"
==
<?php
function onEnd()
{
$this->page->title = $this['post']->title;
$this->page->description = 'by '. $this['post']->user->full_name;
$this->meta_title = $this['post']->title;
$this->page->meta_description = isset($this['post']->excerpt) ? $this['post']->excerpt : '';
}
?>
==
{% component 'blogPost' %}
<div class="article-comments">
<h2>Comments</h2>
{% component 'forumEmbedTopic' %}
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment