]> git.sur5r.net Git - openldap/blob - doc/man/man5/ldaptemplates.conf.5
Initial revision
[openldap] / doc / man / man5 / ldaptemplates.conf.5
1 .TH LDAPTEMPLATES.CONF 5  "13 December 1994" "U-M LDAP LDVERSION"
2 .SH NAME
3 ldaptemplates.conf \- configuration file for LDAP display template routines
4 .SH SYNOPSIS
5 ETCDIR/ldaptemplates.conf
6 .SH DESCRIPTION
7 .LP
8 The file ETCDIR/ldaptemplates.conf contains information used by
9 the LDAP display templates routines (see ldap-disptmpl(3)).  Blank lines
10 and lines that have a first character of `#' are treated as comments and
11 ignored.  Non-comment lines contain one or more tokens.  Tokens are
12 separated by white space, and double quotes `"' can be used to include
13 white space inside a token.
14 .LP
15 The first non-commment line specifies the version of the template
16 information and must contain the token
17 .I Version
18 followed by an integer version number.  E.g.,
19 .nf
20 .ft B
21     Version 1
22 .ft
23 .fi
24 The current version is
25 .I 1,
26 so the above example is always the correct opening line.
27 .LP
28 The remainder of the file consists of one or more display templates.
29 The first two lines of the display template should each contain a single
30 token that specifies singular and plural names for the template that are
31 suitable for human consumption.  These names are stored in the
32 .I dt_name
33 and
34 .I dt_pluralname
35 members of the
36 .I ldap_disptmpl
37 structure.
38 E.g.,
39 .nf
40 .ft B
41     "Person"
42     "People"
43 .ft
44 .fi
45 specifies appropriate names for a template designed to display X.500
46 person information.
47 .LP
48 The next line specifies the name of the icon or similar element that is
49 associated with this template.  E.g.,
50 .nf
51 .ft B
52     "person icon"
53 .ft
54 .fi
55 .LP
56 The next line is a blank-separated list of template options.  "" can be
57 used if no options are desired.  Available options are:  "addable" (it
58 is appropriate to allow entries of this type to be added), "modrdn" (it
59 is appropriate to offer the "modify rdn" operation), "altview" (this
60 template is merely an alternate view of another template, typically
61 used for templates pointed to be a linkaction item).  E.g.,
62 .nf
63 .ft B
64     "addable" "modrdn"
65 .ft
66 .fi
67 .LP
68 The next portion of the template is a list of X.500 object classes that
69 is used to determine whether the template should be used to display a
70 given entry.  The object class information consists of one or more lines,
71 followed by a terminating line that contains the single token
72 .I END.
73 Each line contains one or more object class names, all of which must be
74 present in an X.500 entry for the
75 .I ldap_oc2template(3)
76 routine to return a pointer to this template.
77 The object class information is stored in the
78 .I dt_oclist
79 member of the
80 .I ldap_disptmpl
81 structure.  Multiple lines can be used to associate more than one set
82 of object classes with a given template.  E.g.,
83 .nf
84 .ft B
85     umichPerson
86     lblPerson
87     END
88 .ft
89 .fi
90 means that the template is appropriate for display of umichPerson entries or
91 lblPerson entries.
92 .LP
93 Next next line after the object class list is the name of the attribute
94 to authenticate as to make changes (use "" if it is appropriate to
95 authenticate as the entry itself).  E.g.,
96 .nf
97 .ft B
98     "owner"
99 .ft
100 .fi
101 .LP
102 The next line is the default attribute to use when naming a new entry.
103 E.g.,
104 .nf
105 .ft B
106     "cn"
107 .ft
108 .fi
109 .LP
110 The next line is the default location under which new entries are created.
111 It should be a string-represented Distringuished Name. E.g.,
112 .nf
113 .ft B
114     "o=University of Michigan, c=US"
115 .ft
116 .fi
117 .LP
118 The next section is a list of rules used to assign default values to new
119 entries.  The list should be terminated with a line that contains the
120 single token
121 .I END.
122 Each line in this section should either begin with the token
123 .I constant
124 and be followed by the name of the attribute and a constant value to
125 assign, or the line should begin with
126 .I addersdn
127 followed by the name of an attribute whose value will be the DN of the
128 person who has authenticated to add the entry.
129 E.g.,
130 .nf
131 .ft B
132     constant    associatedDomain        umich.edu
133     addersdn    seeAlso
134     END
135 .ft
136 .fi
137 .LP
138 The last portion of the template is a list of items to display.  It
139 consists of one or more lines, followed by a terminating line that
140 contains the single token
141 .I END.
142 Each line is must begin with the token
143 .I samerow
144 or the token
145 .I item
146 .LP
147 It is assumed that each item appears on a row by itself unless it was
148 preceded by a
149 .I samerow
150 line (in which case it should be displayed on the same line as the
151 previous item, if possible).  Lines that begin with
152 .I samerow
153 should not have any other tokens on them.
154 .LP
155 Lines that begin with
156 .I item
157 must have at least three more tokens on them:  an item type, a label,
158 and an attribute name.  Any extra tokens are taken as extra arguments
159 and are stored in the
160 .I ti_args
161 member of the
162 .I ldap_tmplitem
163 structure.
164 .LP
165 The item type token must be one of the following strings:
166 .I cis
167 (for case ignore string attributes),
168 .I mls
169 (for multiline string attributes),
170 .I mail
171 (for RFC-822 conformant mail address attributes),
172 .I dn
173 (for distinguished name pointer attributes),
174 .I bool
175 (for Boolean attributes),
176 .I jpeg
177 (for JPEG photo attributes),
178 .I jpegbtn
179 (for a button that will retrieve and show a JPEG photo attribute),
180 .I fax
181 (for FAX T.4 format image attributes),
182 .I faxbtn
183 (for a button that will retrieve and show a FAX photo attribute),
184 .I audiobtn
185 (for audio attributes),
186 .I time
187 (for UTC time attributes),
188 .I date
189 (for UTC time attributes where only the date portion should be shown),
190 .I url
191 (for labeled Uniform Resource Locator attributes),
192 .I searchact
193 (to define an action that will do a directory search for other entries),
194 .I linkact
195 (to define an action which is a link to another display template).  See
196 the ACTIONS section below for more information on search and link actions.
197 .LP
198 An example of an item line for the drink attribute (displayed with
199 label "Favorite Beverage"):
200 .nf
201 .ft B
202     item cis    "Favorite Beverage"     drink
203 .ft
204 .fi
205 .SH ACTIONS
206 This section has not been written yet.  Sorry!
207 .SH EXAMPLE
208 The following template configuration file contains two templates, one
209 for display of people entries and one for display of contries.
210 .nf
211 .ft B
212     #
213     # LDAP display templates
214     #
215     # Version must be 1 for now
216     #
217     Version 1
218
219     #
220     # Person template
221     "Person"
222     "People"
223
224     # name of the icon that is associated with this template
225     "person icon"
226
227     # blank-separated list of template options ("" for none)
228     "addable"
229
230     #
231     # objectclass list
232     person
233     END
234
235     #
236     # name of attribute to authenticate as ("" means auth as this entry)
237     ""
238
239     #
240     # default attribute name to use when forming RDN of a new entry
241     #
242     cn
243
244     #
245     # default location when adding new entries (DN; "" means no default)
246     "o=University of Michigan, c=US"
247
248     #
249     # rules used to define default values for new entries
250     END
251
252     #
253     # list of items for display
254     item jpegbtn        "View Photo"            jpegPhoto       "Next Photo"
255     item audiobtn       "Play Sound"            audio
256     item cis    "Also Known As"         cn
257     item cis    "Title"                 title
258     item mls    "Work Address"          postalAddress
259     item cis    "Work Phone"            telephoneNumber
260     item cis    "Fax Number"            facsimileTelephoneNumber
261     item mls    "Home Address"          homePostalAddress
262     item cis    "Home Phone"            homePhone
263     item cis    "User ID"               uid
264     item mail   "E-Mail Address"        mail
265     item cis    "Description"           description
266     item cis    "Favorite Beverage"     drink
267     item dn             "See Also"              seeAlso
268     END
269 .ft
270 .fi
271 .SH FILES
272 ETCDIR/ldaptemplates.conf
273 .SH SEE ALSO
274 .BR ldap (3),
275 .BR ldap_disptmpl (3)