AppendMenuLink method: RCMenuFolder class
Syntax
AppendMenuLink(service_ID, instance_ID)
Description
Use the AppendMenuLink method to instantiate a PTCS_MENULAYOUT:RCMenuLink object and append that link as the last link in the menu folder.
Parameters
| Parameter | Description |
|---|---|
|
service_ID |
Specifies a string value representing the service ID for the parent related content service configuration. |
|
instance_ID |
Specifies an integer value representing the instance ID for the parent related content service configuration. |
Returns
A PTCS_MENULAYOUT:RCMenuLink object.
Example
import PTCS_SRVDEFN:RCServiceDefinition;
import PTCS_SERVICE:RCService;
import PTCS_SRVCONFIG:RCServiceConfig;
import PTCS_MENULAYOUT:RCMenuLayout;
import PTCS_MENULAYOUT:RCMenuFolder;
import PTCS_MENULAYOUT:RCMenuLink;
Component PTCS_SERVICE:RCService &rcService;
Component PTCS_SRVCONFIG:RCServiceConfig &rcServConfig;
Component PTCS_MENULAYOUT:RCMenuLayout &rcMenuLayout;
Component PTCS_MENULAYOUT:RCMenuFolder &rcMenuFolder;
Component PTCS_MENULAYOUT:RCMenuLink &rcMenuLink;
&rcServConfig = &rcService.AddNewService("MY_SERVICE", 0);
&rcMenuLayout = &rcServConfig.AddPageFieldMenu("QE_BOOK.2", "0.QE_BOOK.QE_BOOK_NAME.2");
&rcMenuFolder = &rcMenuLayout.GetFolder(1);
If (&rcMenuFolder <> Null) Then
For &n = 1 To &rcMenuFolder.GetMenuLinkCount()
&rcMenuLink = &rcMenuFolder.AppendMenuLink("MY_SERVICE", &rcServConfig.InstanceId);
If (&rcMenuLink <> Null) Then
/* Do some processing */
End-If;
End-For;
End-If;
Related Topics