Customizing a Post Layout in Graffiti

One of the things I love about Graffiti is how easy it is to make it look good. Something I found myself wanting to do was create an 'about' page, but I don't want to looking like a post. An about page probably shouldn't have a date, tags, comments and other items that aren't relevant. Fortunately, this is really easy to do with Graffiti. Here I'll walk you through the steps required to create an 'about' page with a custom look and feel. I'm going to base this walk-through on the 'Default' theme so you can all follow along. :)

Creating the Post

First off, let's go to the Control Panel and create a new post. We're going to leave the category as 'Uncategorized' and give it a title and some text.

about-page-1 

Next we want to add a navigation item to the site so people can find the new page we've created. Let's go to the Presentation page on the Control Panel menu and select Navigation. On that page, select the Posts tab and you should now see the new post we created in the drop down. Select the post and click 'Add to Navigation'.

about-page-2

Now you should see an option to view your about page on your site. As you can see, we're using the default post view here, so it's showing the date and the fact that the post is uncategorized. Now we'll add the new file to make this page look more like an About page.

about-page-3 

Creating the New View

In the Control Panel, go to Presentation->Themes and you will see link below the 'Default' theme to 'Personalize' it. Clicking that link will take you to the 'Edit Theme' page. Click 'Create new file' and call the file 'about.view' (note: the name of the file needs to be the same as the post name, so if you called your post 'About Me' the file name should be 'about-me.view'). Save the new page and you will be taken to a page where you can edit the content. This page has a cool little drop down menu above it where you can insert 'tokens' that will pull data from Graffiti and show it on your page.

about-page-6

All we want for this page is to display the title and the body, so we'll add the HTML and the tokens to the view to do that.

about-page-4

Now when we view our About page*, all we see is the title and the body as we want it.

about-page-5

Conclusion

Hopefully this post will have shown you just how flexible Graffiti is. The same theory shown here works with categories so for example, if you create a category called 'Articles', you can create a theme file called 'articles.view' with a custom view of the list of posts or any other formatting you want. To change how each post looks in the articles category, simply create a view file called 'articles.post.view'. Easy, huh? I'd love to hear any questions or feedback you might have so leave a comment or email me via my contact page.

 

* Due to caching, currently it will take a few minutes until the view becomes available. This may change in a future release as this article is based on a pre-beta of Graffiti.

50 comment(s) so far

 avatar

Very cool! It looks so easy to use.

The ability to edit the theme files within the control panel reminds me of WordPress and was a very handy feature when I used to have a WordPress powered blog.

Keep the articles coming!

admin avatar

Thanks Chris! If you have any ideas on what you'd like to see articles on, let me know. I'm always looking for ideas. :)

 avatar
Jerry Dean wrote on January 23, 2008

I would like to learn how to create a theme from a css template like this one.

www.opendesigns.org/.../preview

Thank you.

 avatar

Hi Jerry,

Karthik H. @ http://webgambit.com/ does a very nice write up on converting themes. It really helps in understanding the simplicity of how Graffiti CMS works.

 avatar

Great post, very helpful. I searched a while to find this solution.

Thanks.

 avatar

Nice information, it really helps me to customize the layouts.

 avatar

very coll project, thanks

 avatar

hello, this is my first time i visit here. I found so many interesting in your blog especially on how to determine the topic. keep up the good work.

 avatar

very helful for me, thanks much

 avatar

your blog is very good i like your post. thanks

 avatar

Wow! Exactly what I'm looking for. Be happy to find it here. Bookmarked and I will share it. Thanks a lot!

 avatar

I wanna learn about how to build a site with graffiti cms. Your tutorial is very helpful. I'll bookmark this page!Thanks for sharing.

 avatar

I've been looking for tutorials on how to customize post on graffiti layout cms. I am very lucky to find this blog. Your article is very useful to me.

 avatar

Nice Thank you

 avatar

Thanks for the great advice, this was really useful. thanks!

 avatar

thanxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

 avatar

Hello, my laptop is a vista mode and i would like to run an oracle 10g in it, it keeps on telling me that its noe compatible with Vista.I want to make run even though its an xp mode

 avatar

thank u dear

 avatar

nice

thanks dear.....

 avatar

vista mode and i would like to run an oracle 10g in it, it keeps on telling me that its noe compatible with Vista.I want to make run even though its an xp mode

 avatar

vista mode and i would like to run an oracle 10g in it, it keeps on telling me that its noe compatible with Vista.I want to make run even though its an xp mode

 avatar

vista mode and i would like to run an oracle 10g in it, it keep on telling me that its noe compatible with Vista.I want to make run even though its an xp mode

 avatar

Great post! Very informative.

 avatar

mason0507

 avatar

I just installed the newest ctp

.

 avatar

i would like to run an oracle 10g in it, it keeps on telling me that its note compatible with Vista . thank you

 avatar

Thanks, very useful info.

 avatar

I've been trying to find a good website on this subject and related info. Thanks for putting this up.

 avatar

I've been trying to find a good website on this subject and related info. Thanks for putting this up.

 avatar

you wrote an excellent post,

Thanks

 avatar

with this information will help me and thanks for sharing it i learn something new today.,

 avatar

i just wanna thank you for sharing your information and your site or blog this is simple but nice article I've ever seen like it i learn something today...

 avatar

vista mode and i would like to run an oracle 10g in it, it keep on telling me that its noe compatible with Vista.I want to make run even though its an xp mode

 avatar

Hi!!!! Its a very informative article. I really liked it. I appreciate it how nicely you have demonstrated us. Its really understandable. Thanks for shearing such information.

 avatar

Flac to MP3 Converter can convert between all the audio formats like AAC, AC3, AIFF, AMR, AU, Flac, MP3, M4A, MP2, OGG, WAV, WMA as the powerful audio converter.

 avatar
anni wrote on January 23, 2008

i want to change my blog layiut into graffiti layout but i dont know how.could you please help me

 avatar

Simple blog yet informative one.Thanks guys for the post.:)

 avatar

it keeps on telling me that its note compatible with Vista . thank you

 avatar

This info is really very happy for the great technology in this blog and the different info is visible in this blog

 avatar

this was a well written blog. the steps were simple and made easy to follow. this helps. thanks alot

 avatar

I love customizing my site and have used this tutorial to get a great start. Making a personalized site makes it much more attractive in my opinion.

 avatar

It is topic of my interest!

 avatar

Good work! I always like to leave comments whenever I see something unusual or impressive. I think we must appreciate those who do something especial. Keep it up, thanks

Post your comment