FindPgltByName method: PortalRegistry class

Syntax

FindPgltByName(PageletName)

Description

The FindPgltByName method returns the pagelet object corresponding to PageletName. The name is a unique identifier for each pagelet.

Parameters

Parameter Description

PageletName

A unique name within the registry that identifies the Pagelet. This parameter takes a string value. This parameter takes the name of a Pagelet, not the label.

Returns

What this method returns depends on the condition of the Pagelet:

  • If the Pagelet name is valid and the end-user has access to the Pagelet, a Pagelet object is returned.

  • If the Pagelet is valid but the end-user doesn't have access to it a Pagelet object is returned, however, the only property you can access is the Authorized property.

  • If you specified an invalid name this method returns NULL.

Example

The following example returns a pagelet named HomePg_Dictionary:

&MyPglt = &MyPortal.FindPgltByName("HomePg_Dictionary");

Considerations on Returned Pagelets

This method returns pagelet objects that aren't yet valid as well as ones that are no longer valid. When you create your program, check for these properties (ValidTo and ValidFrom) if you don't want to use them.

This method returns pagelet objects that you aren't authorized to. When you use create your program, always check the Authorized property. This is the only property you can view from an object that you're not authorized to view.

Related Topics