Stats page

At the weekend I had a bit of a sort out and made sure I had all the latest files for BlogCFC actually uploaded to the server and also added Scott Pinkston's pod manager to my blog as well.

Now that I've sorted out the pods on the side of the blog without having to go in there and edit the layout.cfm, I thought I best actually put the stats page into the navigation.My first try was to create a page in the blog admin and paste the code directly into there. That went horribly awry, so I just resigned myself to the page being standalone and hacked into a pod on the side some how.

I can't remember what I was looking at but I came across a post by Ray Camden completely by accident that gives a warning about the render functionality in BlogCFC. This mention of the render functionality set a little bell ringing in the back of my mind.... Could I use the rendering support and include to get my stats into the navigation.

As it turns out, with a little tweaking and a mapping to the top of the site, yes I can!

My page in BlogCFC contains :

view plain print about
1<include template="/nil/lastfm.cfm">

and I removed the layout.cfm and a div for the site styles from my lastfm.cfm file and now you can see what I've been listening to by clicking on in the navigation up the top right there.

I've attached my lastfm.cfm file to this entry. There's not much different to what Nick has already written with the few changes that I made. Don't forget to change the ScobblerID and AmazonTagID to your own - or you could just change the ScobblerID and leave the AmazonTagID as mine. ;)