We use Blog.cfc to provide users and organizations on campus here at Hamilton College with an easy way to publish their own blog.  One of our users was having an interesting problem.  Even though he had several entries for his blog, because he had not posted anything in the last month, Blog.cfc was displaying:

?View Code COLDFUSION
1
2
Sorry
There are no blog entries available.

Now wait a second, I know there are LOTS of blog entries available… if I go to a category I can see them, but none are displayed on the home page.  We knew that it was because he had not posted in awhile.  Well, I took a look at the source code and found that on line 67 of the tags/getmode.cfm file there is a parameter being set called params.lastXDays that was set to 30:

?View Code COLDFUSION
1
<cfset params.lastXDays = 30>

Simply changing this default of 30 to 365 will ensure that there will be entries displayed on the home page of his blog (as long as he doesn’t go more than a year without blogging):

?View Code COLDFUSION
1
<cfset params.lastXDays = 365>
This entry was posted on Thursday, August 16th, 2007 at 10:25 am.
Categories: Uncategorized.

No Comments, Comment or Ping

Reply to “Not seeing articles on the front page of Blog.cfc?”