Tweaking BlogCFC: Theme Management
- December 24, 2008 10:17 PM
- BlogCFC
- Comments (11)
One of the really nice things about Wordpress is that it has a very easy to use admin for managing your blog's theme. Working with the design in BlogCFC is a pain: the design is integrated into the actual code for the blog. Further, the code for designs is strewn through a number of different folders (includes/, images/, tags/, includes/pods/, etc.), which makes it hard to fully update a design. I've made the necessary changes to make BlogCFC handle custom theming as easily as Wordpress: click more to see the details.
First of all, you will need to add a line to your blog.ini.cfm page in order to use the new theme support.
theme=Default
...
The second step is to download the new client folder from the link below, and install it. I'd love to be able to offer you a line-by-line description of the changes, but I simply had to change too much in order to pull the layout parts into their new locations. Please note that this version of the client does NOT include the other changes to BlogCFC that I've listed in my Tweaking BlogCFC series.
Now all you will need to do is log into your BlogCFC Administrator in order to manage your themes. The download comes with two themes: Default, which is the standard BlogCFC design, and Green Grunge, a new design I threw together.
Installing New Themes
New themes can be installed from zip files containing the theme, or they can be uploaded your your themes/ directory. Using a zip is probably the best method, as the Theme Manager will automatically verify that the theme contains the necessary files.
Creating New Themes
Creating new themes is easy: just copy the Default theme and modify it as you see fit. The name of your theme is based on the directory in which you place your theme. Underscores are replaced with spaces, so the folder test_theme/ is a theme named "test theme".
- test_theme.zip
- test_theme/
- comment.cfm - layout for a single comment
- comments.cfm - layout for multiple comments (uses comment.cfm)
- footer.cfm - footer
- header.cfm - header
- index.cfm - main layout (uses post.cfm)
- podfooter.cfm - footer for pods
- podheader.cfm - header for pods
- post.cfm - layout for a single post (unexpanded)
- preview.jpg - an image previewing the layout for the admin
- sidebar.cfm - layout for the sidebar
- single.cfm - layout for viewing a single post (expanded, uses post.cfm, comments.cfm, trackbacks.cfm)
- trackbacks.cfm - layout for track backs
- test_theme/
Comments
My blog was registered under the directory name. I added the theme=Default to my blog.ini.cfm and it was still working. Then I overwrote my files with yours and got this erorr: Default isn't registered as a valid blog. The Default directory is contained inside my dir that is registered.
Did you change your blog name in the application.cfc file after over writing? The application.cfc file uses the standard "Default" blog, just like a clean install of BlogCFC.
trying to make the themes work. This will greatly help.
thanks again.
"theme is not a valid property"
It obviously stems from line 42 in the Application.cfm page. Any thoughts on why this is happening?
If not, check back and I'll see if I can figure out whats going on.
I'd be curious to find out, but wont have time to check it myself for a while.
If I get a chance I might give it a try with the latest version of BlogCFC. If I do then I'll let you know if I have any luck.
I've installed BlogCFC 5.9.8, and installed your BlogCFC theme Files - Unfortunately it seems the Two Aren't all that compatible as I've recieved alot of varying errors, so I will be just reverting it back to 5.9.8 vanilla.
Just wanted to let you know. :)