PodManager for BlogCFC
BlogCFC has been going through a lot of changes recently and keeps getting better. One of the smaller things that we have locally talked about was a Pod Manager to control the display and order of pods. Then Ray mentions that he has been toying with the same thing. I'm sure his solution will trump mine but I wanted to go ahead and put this out as a learning experience for me. You can download the zip file from below. In getting started, I wanted to accomplish a couple of things.
- wanted to store the data in a XML file.
- Least amount of changes to BlogCFC core files as possible
I was able to get the core changes down to three files: application.cfm, layout.cfm and adminlayout.cfm. I included the changed adminlayout.cfm but left the other BlogCFC files alone.
Application.cfm
<cfset application.pod = createObject("component", "org.camden.blog.pods")>
Adminlayout.cfm
Layout.cfm
Download the zip, put the new files out, make the changes listed above then go into BlogCFC's admin interface. Prior to using it, you will need to refresh your blogs cache by clicking on the link Refresh Blog Cache or adding reinit=1 to your url. You can now click on Pod Manager to begin the setup.
Open the Pod Manager, select the Pods you want displayed and enter a numeric value for the sort order. In the screenshot, pages.cfm is 1,general.cfm is 2 and so on. After entering the sort order, click on Update Pods.
Refresh your blog and you should see the pods in the order you entered.
You can add & delete pods, and see a preview of the pods output from the manager. On adding new pods, I put a sample pod in, you can either use that or delete it and enter your own.
For any experts out there, I welcome any comments. I learn something new everyday.
Edit: Updated typo in the cfinclude line for the layout.cfm corrected the readme.txt
DOWNLOAD was removed. See http://podmanagerblogcfc.riaforge.org/ for the latest code.


