FUEL CMS User Guide : Version 1.4


Posts

Posts are where you create articles for your blog. Posts are powered by a blog_posts_model and have a grandparent class of MY_Model.

Post Fields

Below are the fields to fill out for a post:


The Post Model Properties

The post model has the following properties:


The Post Model Properties and Methods

The post model has the following relationship properties:

The post model has the following specific methods:

get_content_formatted(strip_images)

Gets the post content with the selected formatting settings applied. You can optionally strip all HTML tags from the excerpt.

get_excerpt_formatted(char_limit, '[readmore]')

Gets the post excerpt. The char_limit parameter will return only a certain character limit (if so, strip_tags is applied). The readmore parameter will be appended to the end of the excerpt with a link to the full post.

is_published()

Returns a boolean of whether the post is published

get_comments('[order]', [limit])

Returns an array of comment objects. Default order is date added in ascending order.

get_comments_count('[order]', [limit])

Returns the number of comments for the post Default order is date added in ascending order.

get_comments_formatted('[block]', [parent_id], [container_class])

Creates the HTML for the comments of the post using the comments block and properly nesting comments if their is a hierarchical structure.

get_categories('[order]')

Returns an array of category objects associated with the post Default ordering is by name in ascending order.

belongs_to_category

get_tags_linked('[order]', '[join]')

Returns a string of category links. Default ordering is by name in ascending order. Default join parameter is ', '.

get_author()

Returns the author object.

get_url('full_path')

Returns the url of the post. The default for full_path is set to TRUE.

get_rss_date()

Returns an rss formatted date for the post.

get_atom_date()

Returns an atom formatted date for the post.

get_date_formatted('[format]')

Returns the date of the post. Takes a date format. Default is 'M d, Y'.

get_allow_comments()

Returns a boolean as to whether comments are allowed.

is_within_comment_time_limit()

Returns a boolean as to whether the current time is within the time limits specified by the post to comment.

get_prev_post()

Returns the previous post based on date.

get_prev_post_url()

Returns the previous post URL based on date.

get_next_post()

Returns the next post based on date.

get_next_post_url()

Returns the next post URL based on date.