Creating Themes
Themes are a set of view files used to render your blog. Because you actually have access to the CodeIgniter super object, your theme files can act like any other CodeIgniter view file. The $blog variable, which is an instance of the Fuel_blog class, is passed to each main view file as well. You could even load in directly any of the blog's models (posts, categories, comments, links and author).
Below are steps to creating a new theme:
- Duplicate the default theme and rename the folder
- In the settings module, change the Theme location parameter to the path to your new theme folder
- Edit the files listed below to your liking
View Files
The following files can be found in your renamed theme folder for you to begin editing to your liking:
Main View Files
- index.php - the main homepage of the blog. Displays post excerpts (similar to posts.php below)
- archives.php - displays a list of older posts grouped by month
- author.php - displays the authors bio information
- authors.php - displays a list of authors for the blog
- categories.php - displays a list of categories
- category.php - displays all the posts for a given category
- post.php - displays the contents of a single post
- posts.php - displays post excerpts
- search.php - displays the search results
Blocks View Files
- about.php - displays the description found in the settings
- archives.php - displays side menu links for older blog posts
- author.php - displays the various authors of the blogs and number of posts associated with them
- categories.php - displays side menu links of blog categories
- comment.php - displays a single comment
- comment_form.php - displays the comment form for a post
- comment_thanks.php - displays the thanks information after a successful comment has been made on a post
- header.php - the HTML header content which normally includes the RSS feed and css links
- post_unpublished.php - displayed when a blog post is not currently published (and you are logged in to FUEL)
- posts.php - used to render an post excerpts and is used for both the posts and category main views
- search.php - displays the side menu search box
- sidemenu.php - displays all the contents for the side menu