NumColumnsPerBrowsePage(); $MinEntriesPerColumn = 3; # determine the number of entries to put in each column $EntriesPerColumn = max( round(count($Classifications) / $NumberOfColumns), $MinEntriesPerColumn); reset($Classifications); for ($ColumnNo = 0; $ColumnNo < $NumberOfColumns; $ColumnNo++) { for ($EntryNo = 0; $EntryNo < $EntriesPerColumn; $EntryNo++) { # reached the end of results before reacing th end of a column if (($Classification = current($Classifications)) === FALSE) { break 2; } PrintClassification($Classification); next($Classifications); } MoveToNextClassificationColumn(); } reset($Classifications); } /** * Print a single classification entry. * @param Classification $Classification The classification to print. * @see PrintClassifications() */ function PrintClassification(Classification $Classification) { $SafeId = defaulthtmlentities($Classification->Id()); $SafeName = defaulthtmlentities($Classification->SegmentName()); $SafeResourceCount = defaulthtmlentities($Classification->FullResourceCount()); ?>

() edit

Id()] = $Schema->Name() . " Schema"; } PrintOptionList("SC", $Options, $SchemaInUse->Id(), TRUE); } /** * Print an option list containing the tree fields for the schema in use. * @param MetadataSchema $SchemaInUse Metadata schema in use. * @param MetadataField $FieldInUse The metadata field to select. */ function PrintTreeFieldOptionList( MetadataSchema $SchemaInUse, MetadataField $FieldInUse=NULL) { PrintOptionList( "FieldId", $SchemaInUse->GetFieldNames(MetadataSchema::MDFTYPE_TREE), is_null($FieldInUse) ? NULL : $FieldInUse->Id(), TRUE, 1, NULL, FALSE); } /** * Print the classification breadbrumb links for the given parent classification. * @param Classification $Parent The parent classification to print the links for. */ function PrintClassificationBreadcrumb(Classification $Parent=NULL) { # don't print anything if there isn't a parent selected if (is_null($Parent)) { return; } # get the hiearchy up to the parent classification $Hierarchy = GetClassificationHierarchy($Parent); $HierarchyStrings = array(); # transform the hiearchy into an array of classification names foreach ($Hierarchy as $Classification) { $SafeId = defaulthtmlentities($Classification->Id()); $Link = ''.$Classification->SegmentName().""; $HierarchyStrings[] = $Link; } # separate each link by "--" and print them print implode(" -- ", $HierarchyStrings); } /** * Print the URL to the page to add a classification for the given field * underneath the given parent classification. * @param MetadataField $Field The metadata field to use. * @param Classification $Parent The optional parent to use. */ function PrintAddClassificationLink( MetadataField $Field, Classification $Parent=NULL) { # -1 needs to be used to signify that the classification should be added at # the top level print "index.php?".http_build_query(array( "P" => "AddClassification", "FieldId" => $Field->Id(), "ParentId" => is_null($Parent) ? -1 : $Parent->Id())); } # ----- MAIN ----------------------------------------------------------------- $ClassificationCount = count($H_Classifications); $SafeSchemaId = defaulthtmlentities($H_Schema->Id()); $SafeSchemaName = defaulthtmlentities($H_Schema->Name()); ?>

# Add/Edit Classifications

There are no tree fields in the metadata schema. Tree fields can be created on the Metadata Field Editor page.

( )

Add Classification Here

(browse hierarchy to add or edit classifications at other levels)

There are currently no classifications in this field at this level.

0) { ?>