Data is a built-in Chalk extension, similar to Macros, which enables quick and easy access to additional Graffiti data. ($data)
Listed below are the available methods and properties.
GetPost(int id)
Gets the Post for the specified ID
GetPost(string name)
Gets the Post for the specified name
Featured
Gets the sites featured post
Featured(int categoryId)
Gets the sites featured post for the specified category Id
Featured(string categoryName)
Gets the sites featured post for the specified category name
Featured(Graffiti.Core.Category category)
Gets the sites featured post for the specifed Category
PostsByTag(string tagName)
Gets all Posts by the specified tag
PostsByTagAndCategory(string tagName, string category)
Gets all posts by the specified tag in the specified category name
PostsByTagAndCategory(string tagName category, string, int numberOfPosts)
Gets all posts by the specified tag with the specified category name with a max number of results
PostsByTagAndCategory(string tagName, Graffiti.Core.Category category)
Gets all posts by the specified tag in the specified Category
PostsByTagAndCategory(string tagName category, Graffiti.Core.Category, int numberOfPosts)
Gets all posts by the specified tag in the specified category with a max number of results
PostsByCategory(string categoryName, int numberOfPosts)
Gets the last x amount of posts from the specified category name
PostsByCategory(Graffiti.Core.Category category, int numberOfPosts)
Gets the last x amount of posts from the specified Category
Categories
Gets all of the sites Categories
GetCategory(int categoryId)
Gets a Category by the specified Id
GetCategory(string categoryName)
Gets a Category by the specified name
RecentComments(int numberOfComments)
Gets the last x amount specified of recent comments
RecentComments(int numberOfComments, string categoryName)
Gets the last x amount of comments from the specified category name
RecentComments(int numberOfComments, int categoryId)
Gets the last x amount of comments from the specified category Id
PostFeedback(int PostId)
Gets the post feedback from the specified postId
PostComments(int PostId)
Gets the post comments from the specified postId
PostTrackbacks(int PostId)
Gets the post trackbacks from the specified postId
RecentPosts(int numberOfPosts)
Gets x amount of recent posts
PopularPosts(int numberOfPosts)
Gets x amount of popular post
PopularPosts(int numberOfPosts, string categoryName)
Gets x amount of popular post by the specified category Name
PopularPosts(int numberOfPosts, int categoryId)
Gets x amount of popular posts from the specified category Id
Tags(int min, int max)
Gets the specified min/max amount of Tags
GetAllTags
Gets all tags
Search(string q pageIndex, int, int pageSize)
Gets a searchresult set by the specified query, pageIndex (usually 0) and max pageSize
SimilarSearch(int postid, int numberOfRelatedPosts)
Gets x amount of similar posts by the postid
GetWidgets(Graffiti.Core.WidgetLocation location)
Gets all widgets in the specified WidgetLocation
RightWidgets
Returns all widgets on the Right sidebar
LeftWidgets
Returns all widgets on the Left sidebar
QueueWidgets
Returns all of the queue widgets
Site
Gets a reference to the SiteSettings object