-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathiccontent.sdf
187 lines (138 loc) · 4.97 KB
/
iccontent.sdf
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
!init OPT_LOOK="icdevgroup"; OPT_STYLE="manual"
# $Id: iccontent.sdf,v 1.2 2004-05-05 15:22:30 jon Exp $
!define DOC_NAME "Content Editor Reference"
!define DOC_TYPE ""
!define DOC_CODE "iccontent"
!define DOC_VERSION substr('$Revision: 1.2 $',11, -2)
!define DOC_STATUS "Draft"
!define DOC_PROJECT "Interchange"
!define DOC_URL "http://www.icdevgroup.org/doc/iccontent.html"
!build_title
H1: Interchange UI -- Content Editor
Interchange is a web presentation framework which has powerful database and
content manipulation features. The Interchange Content Editor provides a
framework for manipulating pages and components within pages.
H2: Content management concept
Interchange assumes that the I<page> is the basic level of content. Each
page is typically a file on the filesystem, though it is possible to maintain
them in a database instead.
Each page is assumed to be based on a C<template>, which is the layout
for that page. Each template can contain I<slots> for I<components>.
Components are interchangeable items that can be inserted in template
slots so that pages based on a common template can vary without having
to create a separate template.
A I<page> may actually be a metacontent template in effect. Examples
of this are the {{CMD[jump="icconfig.html#On-the-fly Catalog Pages"]flypage}}
for building a product page, and the results page that displays search lists.
H2: A typical page
Here is how the file for a page looks:
!block example
[comment]
ui_name: typical.html
ui_page_template: leftonly
[/comment]
[set page_title] A typical page [/set]
[set members_only]0[/set]
[control reset=1]
[control-set]
[parameter1]setting1[/parameter1]
[parameter2]setting2[/parameter2]
[/control-set]
[control-set]
[parameter1]setting1[/parameter1]
[parameter2]setting2[/parameter2]
[/control-set]
[control reset=1]
@_LEFTONLY_TOP__@
<!-- BEGIN CONTENT -->
The content of a typical page.
<!-- END CONTENT -->
@_LEFTONLY_BOTTOM__@
!endblock
You can see other examples in the standard
Interchange {{CMD[jump="icfoundation.html"]foundation}} demo.
We will tour the page, adding the PREAMBLE and POSTAMBLE sections.
LI1: Editor information
The comment at the top of the page is only used by the editor to derive
things it may need to know. If it were to be removed, the page would
display the same; it just may not read and publish the same when edited.
!block example
[comment]
ui_template_name: leftonly
ui_static: 0
[/comment]
!endblock
In the case above, the template is specified with C<ui_template_name>
and the page will not be published statically (i.e. C<ui_static>: 0).
LI1: PREAMBLE
The PREAMBLE is a section which allows page initialization prior to
the header portion of the template, and prior to the setting of
the page controls.
!block example
<!-- BEGIN PREAMBLE -->
[perl]
&custom_init();
[/perl]
<!-- END PREAMBLE -->
!endblock
LI1: Page controls
Page controls are specified in the template definition, and the
user can set them from the I<page control> menu when editing the page.
!block example
[set page_title] A typical page [/set]
[set members_only]0[/set]
!endblock
The above sets two page controls, one used in the header to set the
HTML title for the page, and the other used to determine if the
customer must be logged in (a member) to access the page.
LI1: Component controls
As was said before, a page template can contain multiple components.
Each component can have an unlimited number of settings which can be
used to specify its behavior. These settings are manipulated in the
I<component control> sections of the content editor, one for each
component slot.
!block example
[control reset=1]
[control-set]
[parameter1]setting1[/parameter1]
[parameter2]setting2[/parameter2]
[/control-set]
[control-set]
[parameter1]setting1[/parameter1]
[parameter2]setting2[/parameter2]
[/control-set]
[control reset=1]
!endblock
LI1: Template header section
This is the {{CMD[jump="icconfig.html#Variable"]Variable}} used to contain the top portion of the template,
which may use various I<page control> settings and have multiple
slots for components.
!block example
@_LEFTONLY_TOP__@
!endblock
LI1: CONTENT section
This is the actual content of the page. It can be edited in a TEXTAREA
in the content editor.
!block example
<!-- BEGIN CONTENT -->
The content of a typical page.
<!-- END CONTENT -->
!endblock
LI1: Template footer section
This is the {{CMD[jump="icconfig.html#Variable"]Variable}} used to contain the
bottom portion of the template, which may use various I<page control>
settings and have multiple slots for components.
!block example
@_LEFTONLY_BOTTOM__@
!endblock
LI1: POSTAMBLE
The POSTAMBLE section can contain cleanup code for the page. It will rarely
be used.
!block example
<!-- BEGIN POSTAMBLE -->
[perl]
&custom_cleanup();
[/perl]
<!-- END POSTAMBLE -->
!endblock
N:Copyright 2002-2004 Interchange Development Group. Copyright 2001-2002 Red Hat, Inc. Freely redistributable under terms of the GNU General Public License.