OverrideCNAVDisplayMode function
Syntax
OverrideCNAVDisplayMode([disable])
Description
Important:
OverrideCNAVDisplayMode has been desupported and remains for backward compatibility. Use the OverrideConditionalNav function instead.
Use the OverrideCNAVDisplayMode function to specify whether to disable conditional navigation.
Conditional navigation can be disabled for the life of a component by invoking this function as the first executable statement in a PeopleCode PreBuild event. Alternatively, conditional navigation can be temporarily disabled for just a segment of code in other PeopleCode events.
Important:
When temporarily disabling conditional navigation, you must explicitly re-enable it by calling OverrideCNavDisplayMode( False). Failing to do so will leave conditional navigation disabled for the remainder of the code execution.
The following methods, properties, and functions are “conditional navigation aware,” which means that they will generate a URL or return a value that is dependent on the conditional navigation configuration as well as on the current state as set by the OverrideCNAVDisplayMode function:
-
AbsoluteContentURL property (content reference class and content reference link class).
-
AbsolutePortalURL property (content reference class and content reference link class).
-
FindCRefByName method (PortalRegistry class).
-
FindCRefByURL method (PortalRegistry class).
-
FindCRefLinkByName method (PortalRegistry class).
-
GenerateComponentContentRelURL built-in function.
-
GenerateComponentContentURL built-in function.
-
GenerateComponentPortalRelURL built-in function.
-
GenerateComponentPortalURL built-in function.
-
GenerateComponentRelativeURL built-in function.
-
GenerateHomepagePortalURL built-in function.
-
GenerateHomepageRelativeURL built-in function.
-
GetAbsoluteContentURL method (PortalRegistry class).
-
GetURL built-in function.
-
Transfer built-in function.
-
ViewURL built-in function.
Parameters
| Parameter | Description |
|---|---|
|
disable |
Specifies whether to disable conditional navigation as a Boolean value. Note: The default value is True. |
Returns
(Optional) A Boolean value. True if the function executed successfully, False otherwise.
Example 1
The following example, which must appear in the component PreBuild event, disables conditional navigation for the life of the component:
OverrideCNavDisplayMode( True);
Example 2
The following example temporarily disables conditional navigation to generate a URL to a classic component. Then, conditional navigation is re-enabled for the remainder of the program’s execution.
/* Disable conditional navigation before generating the URL. */
OverrideCNavDisplayMode( True);
&URL = GenerateComponentPortalURL(%Portal, %Node, MenuName."ROLE_MANAGER", "GBL", Component."HR_PROMOTE_APPR", "", "");
/* IMPORTANT: Re-enable conditional navigation */
OverrideCNavDisplayMode( False);
&URL = &URL | "?Action=U&BUSINESS_UNIT=US100&REQ_ID=0000000067";
&URL = &URL | "&SKIPCNAV=1"; /* Add this to skip Pre and Post Processing */
/* Invoke MCFOutboundEmail.Send to send the email including the generated URL */
...