NodeTemplate Collection Methods
In this section, we discuss the NodeTemplate collection methods. The methods are discussed in alphabetical order.
Syntax
DeleteItem(NodeName)
Description
The DeleteItem method deletes the NodeTemplate object identified by NodeName from the NodeTemplate Collection.
This method is not executed automatically. It is executed only when the PortalRegistry is saved.
Parameters
Field or Control |
Definition |
---|---|
NodeName |
Specify the name of a NodeTemplate to delete. |
Returns
A Boolean value: True if the NodeTemplate was deleted, False otherwise.
Example
If Not &MyNodeTemplates.DeleteItem("HRMS") Then
/* Do error processing */
End-if
Syntax
First()
Description
The First method returns the first NodeTemplate object in the NodeTemplate collection.
Parameters
None.
Returns
A NodeTemplate object.
Example
&MyNodeTemplate = &MyCollection.First();
Syntax
InsertItem(NodeName)
Description
The InsertItem method inserts the NodeTemplate object identified by NodeName into the NodeTemplate Collection.
This method is not executed automatically. It is executed only when the PortalRegistry is saved.
Parameters
Field or Control |
Definition |
---|---|
NodeName |
Specify the name of the node template to insert. |
Returns
A reference to the new NodeTemplate object if the method executed successfully, NULL otherwise.
Example
&NewNodeTemplate = &MyPortal.NodeTemplates.InsertItem("CRM");
Syntax
ItemByName(NodeName)
Description
The ItemByName method returns the NodeTemplate object with the name NodeName.
Parameters
Field or Control |
Definition |
---|---|
NodeName |
Specify the name of an existing NodeTemplate object in the collection. If you specify an invalid name, the object is NULL. |
Returns
A NodeTemplate object if successful, NULL otherwise.
Example
&MyNodeTemplate = &MyPortal.NodeTemplates.ItemByName("HRMS");
Syntax
Next()
Description
The Next method returns the next NodeTemplate object in the NodeTemplate collection. You can use this method only after you have used the First method: otherwise the system doesn’t know where to start.
Parameters
None.
Returns
A NodeTemplate object.
Example
&MyNodeTemplate = &MyCollection.Next();