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