-
Notifications
You must be signed in to change notification settings - Fork 0
/
Theme.cfc
221 lines (215 loc) · 8.61 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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
/**
* 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_themeName_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, color)
* - 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
* - optionsUDF : The select box options. This points to a UDF that returns a list or array of values or an array of name-value pair structures. Example: getColors not getColors()
* - group : lets you group inputs under a Group name - settings should be in order for groupings to work as expected
* - groupIntro : Lets you add a description for a group of fields
* - fieldDescription : Lets you add a description for an individual field
* - fieldHelp : Lets you add a chunk of HTML for a Modal, openable by the User by clicking on question mark next to the field label. Recommended use is to readFiles from the ./includes/help directory, with a helper function, for example: loadHelpFile( 'cbBootswatchTheme.html' );
*/
component{
// Layout Variables
this.name = "Responsive Theme - Materialize CSS";
this.description = "Responsive Blog Theme - Materialize CSS";
this.version = "3.0";
this.author = "Lucid Outsourcing Solutions";
this.authorURL = "https://lucidoutsourcing.com";
// Screenshot URL, can be absolute or locally in your layout package.
this.screenShotURL = "screenshot.png";
// Layout Settings
this.settings = [
{
name : "cssStyleOverrides",
group : "Colors",
defaultValue : "",
type : "textarea",
label : "CSS Style Overrides:",
fieldDescription : "Enter CSS you would like added to your Theme to override the defaults from your Bootswatch"
},
{
name : "headerLogo",
group : "Header",
defaultValue : "",
type : "text",
label : "Logo URL:",
groupIntro : "Customize the header section of your theme. You can change the logo and the search field.",
fieldDescription : "Enter a relative or full url for the website logo. This image is not scaled with html or css, so please size it accordingly. Resize the image to approximately 300x50."
},
{
name : "showSiteSearch",
group : "Header",
defaultValue : "true",
type : "boolean",
label : "Show Search Form Field in Header",
required : "false"
},
{
name : "footerBox",
group : "Footer",
defaultValue : "",
type : "textarea",
label : "Footer Text:",
groupIntro : "Customize the footer of your site."
},
{
name : "rssDiscovery",
group : "Homepage",
defaultValue : "true",
type : "boolean",
label : "Active RSS Discovery Links",
required : "false"
},
{
name : "showCategoriesBlogSide",
group : "Blog Sidebar Options",
defaultValue : "true",
type : "boolean",
label : "Show Categories in Blog Sidebar",
required : "false",
groupIntro : "By default, you have lots of widgets displayed in the Blog Sidebar. Enable or Disabled those items below."
},
{
name : "showRecentEntriesBlogSide",
group : "Blog Sidebar Options",
defaultValue : "true",
type : "boolean",
label : "Show Recent Enties in Blog Sidebar",
required : "false"
},
{
name : "showSiteUpdatesBlogSide",
group : "Blog Sidebar Options",
defaultValue : "true",
type : "boolean",
label : "Show Site Updates in Blog Sidebar",
required : "false"
},
{
name : "showEntryCommentsBlogSide",
group : "Blog Sidebar Options",
defaultValue : "true",
type : "boolean",
label : "Show Entry Comments in Blog Sidebar",
required : "false"
},
{
name : "showArchivesBlogSide",
group : "Blog Sidebar Options",
defaultValue : "true",
type : "boolean",
label : "Show Archives in Blog Sidebar",
required : "false"
},
{
name : "showEntriesSearchBlogSide",
group : "Blog Sidebar Options",
defaultValue : "true",
type : "boolean",
label : "Show Entries Search in Blog Sidebar",
required : "false"
},
{
name : "facebookshareurl",
group : "Social Pages Options",
defaultValue : "",
type : "text",
label : "Facebook Share Link",
required : "false"
},
{
name : "twittershareurl",
group : "Social Pages Options",
defaultValue : "",
type : "text",
label : "Twitter Share Link",
required : "false"
},
{
name : "googleshareurl",
group : "Social Pages Options",
defaultValue : "",
type : "text",
label : "Google Share Link",
required : "false"
},
{
name : "linkedinshareurl",
group : "Social Pages Options",
defaultValue : "",
type : "text",
label : "Linkedin Share Link",
required : "false"
}
];
/**
* 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(){
}
}