OverrideConditionalNav

Mon 01 January 2018

Syntax

OverrideConditionalNav([mode])

Description

Use the OverrideConditionalNav function to specify how 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 OverrideConditionalNav(%CNAV_RestoreAll). Failing to do so will leave conditional navigation disabled for the remainder of the PeopleCode program.

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 OverrideConditionalNav 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

Field or Control

Definition

mode

Specifies how to disable conditional navigation as an Integer value.

Specify the mode as one of the following values. You can use either the numeric or constant value. Except for %CNAV_SkipAll and %CNAV_RestoreAll, any of the other constant values can be combined. For example, specifying 12 is the equivalent of specifying %CNAV_SkipDisplayMode + %CNAV_SkipToolsRel while specifying 60 is the equivalent of specifying %CNAV_SkipAll.

Numeric Value

Constant Value

Description

1

%CNAV_SkipAll

Note: The default value is %CNAV_SkipAll.

Ignores all conditional navigation attributes.

2

%CNAV_RestoreAll

Turns on conditional navigation

4

%CNAV_SkipDisplayMode

Ignores CN_DISPLAYMODE attributes only.

8

%CNAV_SkipToolsRel

Ignores CN_TOOLSREL attributes only.

16

%CNAV_SkipGeneric

Ignores user-defined conditional navigation attributes only.

32

%CNAV_SkipNavGroup

Ignores CN_NAVGROUP attributes only.

Note: The skipcnav query string parameter that can be appended to a generated URL takes the same integer values that are valid for the mode parameter of the OverrideConditionalNav function. This includes the ability to combine two values by using their sum as the integer value. See Example 4 for information on how to post-process a URL to append the skipcnav query string parameter.

Returns

(Optional) An Integer value. 1 indicates the function executed successfully, 0 indicates failure.