User Guide

Table Of Contents
Advanced topics 541
<cfloop index = "thisElement"
list = #ReplaceNoCase(EntryList2.attributeTypes, ", alias", "<br>
Alias",
"all")# delimiters = ",">
<cfscript>
thiselement = Trim(thisElement);
nameloc = Find("NAME", thisElement);
descloc = Find("DESC", thisElement);
syntaxloc = Find("SYNTAX", thisElement);
singleloc = Find("SINGLE", thisElement);
endloc = Len(thisElement);
</cfscript>
<tr>
<td><cfoutput>#Mid(thisElement, nameloc+6, descloc-nameloc-8)#
</cfoutput></td>
<td><cfoutput>#Mid(thisElement, descloc+6, syntaxloc-descloc-8)#
</cfoutput></td>
<cfif #singleloc# EQ 0>
<td><cfoutput>Yes</cfoutput></td>
<cfelse>
<td><cfoutput>No</cfoutput></td>
</cfif>
</tr>
</cfloop>
</table>
</body>
</html>
2.
Change the server from ldap.mycorp.com to your LDAP server. You might also need to
specify a user ID and password in the
cfldap tag.
3.
Save the template as ldapschema.cfm in myapps under your web root directory and view it in
your browser.
Reviewing the code
The following table describes the code and its function:
Code Description
<cfldap
name="EntryList"
server="ldap.mycorp.com"
action="query"
attributes="subschemaSubentry"
scope="base"
start="">
Gets the value of the subschemaSubentry
attribute from the root of the directory
server. The value is the DN of the schema.
<cfldap
name="EntryList2"
server="ldap.mycorp.com"
action="query"
attributes="objectclasses,
attributetypes"
scope="base"
filter="objectclass=*"
start=#entryList.subschemaSubentry#>
Uses the schema DN to get the
objectclasses and attributetypes attributes
from the schema.