---
title: Establish banner defaults
summary: Establish the environment-driven defaults that the render step depends on.
status: draft
owner: SAIF Doc Gen
last_reviewed: 2026-08-17
library: SAIF.Presentation.Web.Controls.V2
reference_type: package
operation_id: OP-V2-002
trigger: Called from `OnInit` when the `BannerControl` is not in design mode.
---

# Establish banner defaults

Establish the environment-driven defaults that the render step depends on. Called from `OnInit` when the `BannerControl` is not in design mode.

| Field | Value |
| --- | --- |
| **Operation ID** | OP-V2-002 |
| **Trigger** | Called from `OnInit` when the `BannerControl` is not in design mode. |
| **Inputs** | `AppGlobal.EnvironmentService.IsClientExternal`, the current `HttpContext`, the template source directory. |
| **Outputs** | Internal/insider flag, default link visibility flags, resolved banner path, `LoggingIn` flag. |
| **Primary components** | `BannerControl.SetBannerControlDefaults` |
| **Entry point** | `SAIF.Presentation.Web.Controls.V2/Banner.vb` |

## Steps

1. Read `AppGlobal.EnvironmentService.IsClientExternal` and set the internal ("insider") flag to its negation. ([BR-V2-015](../business-rules.md#br-v2-015-insider-status-is-the-negation-of-isclientexternal))
   - > **Origin**: `AppGlobal.EnvironmentService` is imported from the `SAIF.Framework.Security` namespace; its owning assembly could not be confirmed from this repository.**
2. Default feedback, banner and logout visibility to "visible only for external clients". ([BR-V2-016](../business-rules.md#br-v2-016-links-default-to-external-only-visibility))
3. If an `HttpContext` exists, map `/RESOURCES/SITEBANNER.XML` to a physical path; if the file does not exist, clear the path so rendering is skipped. ([BR-V2-017](../business-rules.md#br-v2-017-banner-definition-resolved-from-a-fixed-site-path), [BR-V2-003](../business-rules.md#br-v2-003-missing-banner-definition-suppresses-all-rendering))
4. Derive the current application name from the last segment of the mapped template source directory (upper-cased) and set `LoggingIn` when it equals `ONLINELOGIN`. ([BR-V2-018](../business-rules.md#br-v2-018-login-application-detected-by-template-directory-name))

## Process flow

The following diagram visualizes this operation's control flow.

```mermaid
flowchart TD
	Start([SetBannerControlDefaults]) --> S1[Read IsClientExternal, invert to Insider flag]
	S1 --> S2[Default link visibility for external clients]
	S2 --> S3{HttpContext exists?}
	S3 -->|Yes| S4[MapPath SiteBanner.xml]
	S4 --> S5{File exists?}
	S5 -->|No| Clear[Clear banner path]
	S5 -->|Yes| S6[Derive application name]
	S3 -->|No| S6
	Clear --> S6
	S6 --> EndOk([Defaults established])
```

## Failure and edge-case behavior

- No exceptional failure handling beyond the branches described in **Steps** was found in the analysis findings.*

## Related documentation
- [Operations and processes](../operations-processes.md)
- [Business rules](../business-rules.md)

> **Note:** Statements marked with `*` were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts. Statements marked with `**` could not be confirmed; treat as unknown until verified.

## Sources
- `SAIF.Presentation.Web.Controls.V2/Banner.vb`
