root/trunk/website/blog/admin/categories.cfm

Revision 5, 1.2 kB (checked in by DanWilson, 17 years ago)

Initial Commit Of ModelGlue? Website (upgrade to blogcfc 511)

Line 
1<cfsetting enablecfoutputonly=true>
2<cfprocessingdirective pageencoding="utf-8">
3<!---
4        Name         : C:\projects\blogcfc5\client\admin\categories.cfm
5        Author       : Raymond Camden
6        Created      : 04/07/06
7        Last Updated :
8        History      :
9--->
10
11<!--- handle deletes --->
12<cfif structKeyExists(form, "mark")>
13        <cfloop index="u" list="#form.mark#">
14                <cfset application.blog.deleteCategory(u)>
15        </cfloop>
16</cfif>
17
18
19<cfset categories = application.blog.getCategories()>
20
21<cfmodule template="../tags/adminlayout.cfm" title="Categories">
22
23        <cfoutput>
24        <p>
25        Your blog currently has
26                <cfif categories.recordCount>
27                #categories.recordcount# categories
28                <cfelseif categories.recordCount is 1>
29                1 category
30                <cfelse>
31                0 categories
32                </cfif>.
33        </p>
34        </cfoutput>
35
36        <cfmodule template="../tags/datatable.cfm" data="#categories#" editlink="category.cfm" label="Categories"
37                          linkcol="categoryname" linkval="categoryid">
38                <cfmodule template="../tags/datacol.cfm" colname="categoryname" label="Category" />
39                <cfmodule template="../tags/datacol.cfm" colname="entrycount" label="Entries" />
40        </cfmodule>
41       
42</cfmodule>
43
44
45<cfsetting enablecfoutputonly=false>
Note: See TracBrowser for help on using the browser.