CreateContentRefLink method: PortalRegistry class

Syntax

CreateContentRefLink(LinkName, LinkLabel, LinkParent, CRefPortalName, CRefObjectName)

Description

Use the CreateContentRefLink method to create a link to any content reference in any portal in a local database.

For example, using this method, you can create a link to a content reference in the EMPLOYEE portal, to a content reference in the CUSTOMER portal, or to a content reference in the current portal.

Parameters

Parameter Description

LinkName

Specify the name of the link as a string. This is the ID of the link. The name is validated as that of the content reference name. It cannot start with a number, and can not have special characters and spaces. This property is not translated.

LinkLabel

Specify the label of the link as a string. This property can be translated. This is the label that appears on the left hand navigation menu If this value is blank, a linked content reference label is displayed instead.

LinkParent

Specify the parent folder of the link, as a string.

CRefPortalName

Specify the portal name of the content reference, to which the link is pointing, as a string.

CRefObjectName

Specify the ID of the content reference to which the link is pointing, as a string.

Returns

A reference to a newly created ContentReference link object.

Example

Local ApiObject &Portal, &CRef, &CReflink;
&Portal = PortalOpen();
&CReflink = &Portal.CreateContentRefLink(<Unique Link Name> , <LinkLable>,⇒
 "<Link's Parent folder >", "<Cref Portal Name>", <Cref Object Name>);

/*... Use the link object */

&Portal.Close();