Graffiti makes a lot of things easy, of course I still manage to dig myself holes here and there.
I wanted to learn how to create “non-blog” pages, that is posts that won’t show up on the home page or in blog lists. The about page is a good example of that.
Graffiti provides a very simple solution: in Site Options>Configuration there is a checkbox:
Just make sure that first box is unchecked. Now, create a new post called About, and create a Navigation link to it using the Posts dropdown in Control Panel>Presentation>Navigation:
All that is good, but in the theme I’m using (GulfCoasting), I needed to make a change to Posts.view (edit from within Graffiti at Control Panel>Presentation>Themes>post.view). The problem was that the About page showed all the Comment form and related post information, which of course we don’t want in an About page.
I’m not sure that this is the most elegant solution, but I added an #if statement to the beginning of the page (after a bit of fooling around, finally got this to work):
#if ($category.IsUncategorized)
<div class="post">
<h2><a href="$post.Url" rel="bookmark" title="$post.Title">$post.Title</a></h2>
<div class="entry">
$post.Body
</div>
</div>#else
<div class="post">…(the rest of the post.view code is here)
This strips out everything but the post body itself from an uncategorized (and unlisted, unless you link to it) post.
Now we have a nice clean About page ![]()
