Red Hat Version4.1 Manual Do Utilizador

Página de 156
Chapter 5, Entry Types and Object Class Attributes 51
Object Class Attributes in Template Files
Templates and Directives
Object class attributes associated with an entry type are defined by directives 
contained in gateway template files. Directives are instructions, written as 
HTML comments, that are interpreted by the gateway’s CGI scripts. Each 
directive is an independent, single line of HTML in a template file (with the 
exception of <!-- GCONTEXT -->, which is embedded within an URL). 
Entry-Related Directives
Entry-related directives are responsible for how the gateway displays, edits, 
adds, and lists directory entries. The most commonly used entry-related 
directive is DS_ATTRIBUTE, which determines how attributes in LDAP entries 
are displayed on gateway forms. 
DS_ATTRIBUTE directives begin with a DS_ENTRYBEGIN tag and close with a 
DS_ENTRYEND tag. 
See Also
Appendix B, “Gateway Directives Reference” lists the possible arguments for the 
DS=ATTRIBUTE directive.
Adding Attributes to Object Classes
Adding an attribute to an object class requires adding an additional row to the 
HTML table in the template file where the object class is defined.
The syntax in Example 5.2defines an Initials attribute for the orgperson object 
class.
Example 5.2 Adding Initials attribute to orgperson object class
<TR>
<TD VALIGN= ”TOP” NOWRAP>Initials</TD>
<TD VALIGN= ”TOP” NOWRAP><B>
<!-- DS ATTRIBUTE “attr=Initials“ “syntax=cis“ “cols=>16“ -->
</B></TD>
<TD>&nbsp;</TD>
<TD>&nbsp;</TD>