DeleteItem method: Content Reference collection

Syntax

DeleteItem(ContentReferenceName)

Description

The DeleteItem method deletes the content reference object identified by ContentReferenceName from the content reference Collection.

If you delete a template for a content reference, and none of the other content references on a page have a template, the default template specified with the ContentProvider is used. If there's no template for the ContentProvider, the template for the PortalRegistry is used. However, if you delete the template for the content reference, the ContentProvider, and the PortalRegistry, you receive a runtime error.

Note:

The portal registry classes execute some methods "interactively", that is, as they happen. The item won't be marked for deletion, then actually deleted later. The item is deleted from the database as soon as the method is executed.

Parameters

Parameter Description

ContentReferenceName

Specify the name of a content reference existing in the content reference collection.

Returns

A Boolean value: True if the content reference was deleted, False otherwise.

Example

If Not &MyCRef.DeleteItem("Test_CRef") Then
   /* can't delete test data. Do error processing */
End-if;