How to Use the Privacy Banner

Global Privacy Banner

The global privacy banner is already included in the site layout and will appear at the bottom of every page. It can be dismissed by the user and uses localStorage to remember the user's preference.

This banner is implemented in _Layout.cshtml with:

<partial name="_PrivacyBanner" />

Standalone Privacy Banner

The standalone privacy banner can be included on specific pages where you want to highlight privacy information. Below is an example of the standalone banner:

We value your privacy. Please review our Privacy Policy.
Learn More

To include this banner on any page, add the following code:

<partial name="_PrivacyBannerStandalone" />

You can also specify a custom redirect URL:

<partial name="_PrivacyBannerStandalone" model="/Controller/CustomPage" />

Customization

Both banners can be customized by modifying their respective partial view files:

  • Views/Shared/_PrivacyBanner.cshtml - Global banner that appears at the bottom of the page
  • Views/Shared/_PrivacyBannerStandalone.cshtml - Standalone banner that can be included on specific pages

The styles are included within each partial view for ease of use, but you can move them to your CSS files for better organization if needed.