Render the site banner¶
Render the SAIF site banner from XML-defined content, honoring internal/external visibility. ASP.NET page lifecycle invokes Render on a BannerControl instance hosted on a page.
| Field | Value |
|---|---|
| Operation ID | OP-V2-001 |
| Trigger | ASP.NET page lifecycle invokes Render on a BannerControl instance hosted on a page. |
| Inputs | PrintPageTitle, ShowInternalDisplayBanner, DisplayBannerLogout, resolved /Resources/SiteBanner.xml content. |
| Outputs | HTML banner markup (print and/or display banner) written to the response output stream. |
| Primary components | BannerControl.Render |
| Entry point | SAIF.Presentation.Web.Controls.V2/Banner.vb |
Steps¶
- On
OnInit, run banner defaults setup (OP-V2-002) unless the control is in design mode. (BR-V2-001) - On
Render, ifContext Is Nothing(design time), emit a static placeholder<div>containing theCustomerHeadermarkup and stop. (BR-V2-002) - If the resolved banner-definition path is empty, exit without rendering anything. (BR-V2-003)
- Load the banner XML document from the resolved path into an
XmlDataDocument. (BR-V2-004) - Select
business_online_banner/banner_body/print; if present, substitute[TITLE]withPrintPageTitleand write the print banner. (BR-V2-005, BR-V2-006) - If
ShowInternalDisplayBanneris false, exit before rendering the display banner. (BR-V2-007) - Select
business_online_banner/banner_body/display; substitute[TITLE]withPrintPageTitleand[LINKS]with*, then split the body on*. (BR-V2-006, BR-V2-008) - Write the leading body fragment, then render the
SAIF.comlink, the logout link, the feedback link, and the phone label, separating each with the XML-defined separator. (BR-V2-009, BR-V2-010, BR-V2-011, BR-V2-012, BR-V2-013) - If
DisplayBannerLogoutis true andLoggingInis false: render the logout link. - If
LoggingInis true: render the plain XML-defined feedback link instead of the pop-up variant. - If
LoggingInis false: render the feedback link as awindow.opencall to/BusinessOnline/BusinessOnlineFeedback.aspxsized 641x505. - Append the remaining body fragments and write them to the output stream. (BR-V2-014)
Process flow¶
The following diagram visualizes this operation's control flow.
flowchart TD
Start([Render invoked]) --> D1{Design time?}
D1 -->|Yes| PH[Emit static placeholder div]
D1 -->|No| PathCheck{Banner path resolved?}
PathCheck -->|No| NoOut([No output])
PathCheck -->|Yes| LoadXml[Load SiteBanner.xml]
LoadXml --> PrintCheck{print node exists?}
PrintCheck -->|Yes| RenderPrint[Render print banner]
PrintCheck -->|No| InternalCheck
RenderPrint --> InternalCheck{ShowInternalDisplayBanner?}
InternalCheck -->|No| StopDisplay([Stop before display banner])
InternalCheck -->|Yes| RenderDisplay[Render display banner links]
RenderDisplay --> Done([Banner rendered])
Failure and edge-case behavior¶
- No exceptional failure handling beyond the branches described in Steps was found in the analysis findings.*
Related documentation¶
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