Hi,
I am creating a simple blog section, I want to display categories on each blog post.
For the categories I have created a page (hidden) called 'Categories' and for each category a child page under this:
On my blog-entry template I have added a page field type called 'categories' which allows me to select multiple categories from my parent page shown in the image above. Is this the right approach?
Just having trouble displaying the categories on my blog-entry template:
<?php
/**
* Blog Entry
*
*/
include("./head.inc");
?>
<h1><?=$page->title?></h1>
<p>Date:<?=$page->date?></p>
<p>Category:<?=$page->categories?></p>
<div id='bodycopy'>
<?=$page->body?>
</div>
<?php
echo $page->comments->render();
echo $page->comments->renderForm();
?>
<?php
include("./foot.inc");
I have applied 2 categories to this blog post
my categories are being listed as '1034|1033' so obviously my code is not right.
heres a link which shows this:
http://www.hoof.net.au/pwire/blog/blog-entry-1/
Also, how do i go about having a list of category links which display those blog posts, would it require a new page template like an 'archive' blog posts template. I'm not sure how to approach this.
thanks,
Alex