Post Properties
Get descriptions of the post property settings.
Listed below are the available properties.
- Body – Renders PostBody + ExtendedBody.
- Category – Category with which the post is associated.
- CommentCount – Number of published Comments.
- CustomExcerpt(int len) - Forces an excerpt on the PostBody by removing len non-HTML characters.
- Excerpt(string startText, string endText, string linkText, int len)– If ExtendedBody is not null, it renders PostBody. Otherwise, it will render the first len non-HTML characters from PostBody. Example: $post.Excerpt("<p>Continue reading <em>"", ""</em></p>" ,$post.Title, 300).
- GetCustom(string key) - returns the value from a custom field.
- EnableComments – Specifies whether comments enabled for this post.
- EnableNewComments – Returns true if the post allows new comments.
- ExtenededBody – optional post content. This is usually displayed when the full post view is requested.
- HasComments – Returns true if a post has one or more comment.
- Id – The Post Id.
- PendingCommentCount – Number of comments which require approval.
- PostBody – The main post content. This can be “lead-in” or excerpt if ExtendedBody is specified.
- MetaDescription - The meta description for the post.
- MetaKeywords - The meta keywords for the post.
- Name – The value used in the post’s Url.
- TagList – Comma seperated list of Tags.
- Title – The title of the post.
- UniqueId – Globally unique id for the post (Guid).
- Version – Version number of the post.
- Views – Number of times the post has been viewed (note: we do try to prevent against refreshes).
- Url – Absolute Url to the Post.
- UserName – username of the post’s author.
- ImageUrl - an image that can be optionally assigned to the post.
- User (Graffiti User)