/
Theme.cfc
106 lines (98 loc) · 4.96 KB
/
Theme.cfc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
/**
* ContentBox - A Modular Content Platform
* Copyright since 2012 by Ortus Solutions, Corp
* www.ortussolutions.com/products/contentbox
* ---
* A theme is composed of the following pieces
*
* /ThemeDirectory
* + Theme.cfc (The CFC that models your theme implementation)
* / layouts (The folder that contains layouts in your theme)
* + blog.cfm (Mandatory layout used for all blog views by convention)
* + pages.cfm (Mandatory layout used for all pages by convention)
* + maintenance.cfm (Optional used when in maintenance mode, else defaults to pages)
* + search.cfm (Optional used when doing searches, else defaults to pages)
* / views (The folder that contains views for rendering)
* + archives.cfm (MANDATORY: The view used to render out blog archives.)
* + entry.cfm (MANDATORY: The view used to render out a single blog entry with comments, etc.)
* + error.cfm (MANDATORY: The view used to display errors when they ocurr in your blog or pages)
* + index.cfm (MANDATORY: The view used to render out the home page where all blog entries are rendered)
* + notfound.cfm (The view used to display messages to users when a blog entry requested was not found in our system.)
* + page.cfm (MANDATORY: The view used to render out individual pages.)
* + maintenance.cfm (OPTIONAL: Used when in maintenance mode)
* / templates (The folder that contains optional templates for collection rendering that are used using the quick rendering methods in the CB Helper)
* + category.cfm (The template used to display an iteration of entry categories using coldbox collection rendering)
* + comment.cfm (The template used to display an iteration of entry or page comments using coldbox collection rendering)
* + entry.cfm (The template used to display an iteration of entries in the home page using coldbox collection rendering)
* / widgets (A folder that can contain layout specific widgets which override core ContentBox widgets)
*
* Templates
* Templates are a single cfm template that is used by ContentBox to iterate over a collection (usually entries or categories or comments) and
* render out all of them in uniformity. Please refer to ColdBox Collection Rendering for more information. Each template recevies
* the following:
*
* _counter (A variable created for you that tells you in which record we are currently looping on)
* _items (A variable created for you that tells you how many records exist in the collection)
* {templateName} The name of the object you will use to display: entry, comment, category
*
* Layout Local CallBack Functions:
* onActivation()
* onDelete()
* onDeactivation()
*
* Settings
* You can declare settings for your layouts that ContentBox will manage for you.
*
* this.settings = [
* { name="Title", defaultValue="My Awesome Title", required="true", type="text", label="Title:" },
* { name="Colors", defaultValue="blue", required="false", type="select", label="Color:", options="red,blue,orange,gray" }
* ];
*
* The value is an array of structures with the following keys:
*
* - name : The name of the setting (required), the setting is saved as cb_layoutname_settingName
* - defaultValue : The default value of the setting (required)
* - required : Whether the setting is required or not. Defaults to false
* - type : The type of the HTMl control (text=default, textarea, boolean, select)
* - label : The HTML label of the control (defaults to name)
* - title : The HTML title of the control (defaults to empty string)
* - options : The select box options. Can be a list or array of values or an array of name-value pair structures
*
*/
component{
// Layout Variables
this.name = "Sparkling";
this.description = "Sparkling theme by https://colorlib.com";
this.version = "1.0.0";
this.author = "Tropicalista";
this.authorURL = "http://www.tropicalseo.net";
// Screenshot URL, can be absolute or locally in your layout package.
this.screenShotURL = "screenshot.png";
// Layout Settings
this.settings = [
{ name="facebook", defaultValue="", type="text", label="Facebook link:" },
{ name="google", defaultValue="", type="text", label="Google+ link:" },
{ name="twitter", defaultValue="", type="text", label="Twitter link:" },
{ name="pinterest", defaultValue="", type="text", label="Pinterest link:" },
{ name="instagram", defaultValue="", type="text", label="Instagram link:" },
{ name="footerText", defaultValue="", type="textarea", label="Footer text:" },
{ name="footerSocial", defaultValue="", type="boolean", label="Display social icons on footer:" },
{ name="footerWidget", defaultValue="", type="boolean", label="Display widgets on footer:" },
{ name="sidebarSocial", defaultValue="", type="boolean", label="Display social icons on sidebar:" }
];
/**
* Call Back when layout is activated
*/
function onActivation(){
}
/**
* Call Back when layout is deactivated
*/
function onDeactivation(){
}
/**
* Call Back when layout is deleted from the system
*/
function onDelete(){
}
}