This project has moved. For the latest updates, please go here.

Standard Chalk Items

To make customizing and creating new themes as easy as possible, Graffiti exposes standard items to Chalk.

While it very easy to add your own Chalk items, the items listed below should enable you to meet your design goals in record time. Graffiti exposes data to view files using the following format: $Item_Name.

On every page request, Graffiti exposes the following items:
  • $url - The requested url.
  • $user - The current user.
  • $isUser - True/False - Is the current user an Editor, Manager, or Contributor?
  • $urls - A utility for rendering links to other site pages.
  • $categoryID - The current category id. It will be -1 if a category does not exist.
  • $postID - The current post id. It will be -1 if the current page is not a single post page.
  • $tagName - The name of the current tag. This value will be null if the current page is not a tag page.
  • $where - Contains a description of the current page type. Valid values are home, category, post, and search.
  • $pageIndex - Contains the current page number if the current page has paging enabled.
  • $macros - A library of tools to build a view.
  • $data - A library of tools to look up custom data.
  • $feeds - A library which enables you to read data from external RSS, Atom, and OPML feeds.
Graffiti will then expose the following page specific data:
  • Home Page
    • $posts - a list of the most recent posts
  • Category Page
    • $posts - a list of the most recent posts in the current category
    • $category - details about the current category
  • Post Page
    • $post - details about the current post
    • $category - details about the category this post belongs to.
    • $comments - a list of comments for the current post.
  • Search Page
    • $posts - a list of posts matching the current search request.
  • Tag Page
    • $posts - a list of posts matching the current Tag.
    • $tag - details about the current Tag.

Last edited May 2, 2010 at 6:59 PM by charlesboyung, version 5

Comments

No comments yet.