BlogCFC Tweaks: Bug Fix for viewByCategory.cfm
- December 12, 2008 2:15 PM
- BlogCFC
- Comments (0)
I recently posted a blog entry with some code and instructions to allow drilling down into categories to view the posts in that category. Unfortunately, it had a bug. The meat of the viewByTemplate.cfm file should look like this:
<cfmodule template="../tags/datatable.cfm" data="#entries#" editlink="entry.cfm" label="Entries"
linkcol="title" defaultsort="posted" defaultdir="desc">
<cfmodule template="../tags/datacol.cfm" colname="title" label="Title" />
<cfmodule template="../tags/datacol.cfm" colname="released" label="Released" format="yesno"/>
<cfmodule template="../tags/datacol.cfm" colname="posted" label="Posted" format="datetime" />
<cfmodule template="../tags/datacol.cfm" colname="views" label="Views" format="number" />
<cfmodule template="../tags/datacol.cfm" label="View" data="<a href=""#application.rooturl#/index.cfm?mode=entry&entry=$id$"">View</a>" sort="false"/>
</cfmodule>
Notice the missing "querystring" attribute on the datatable module. If you don't remove that bit, clicking on a blog post link from the category view wont take you to that blog post at all. I've updated the code in the relevant zip.
Print
Send
Digg It!


Comments
There are no comments for this entry.
Add Comment