Block Page Template

The block page template allows you to modify the appearance of the various notification pages that the Web Appliance displays to users when they try to access:

  • virus-infected files
  • malware
  • blocked sites
  • sites or applications that violate policy
  • sites which will use or exceed their quota time
  • restricted sites
  • unapproved secure sites

This template affects neither the appearance of the patience page (the page displayed when users request a large file download), nor the server error pages (HTTP error messages), for example, 404 File not Found or 500 Internal Server Error.

This template has very few required elements, and it provides a set of optional page element keys. Apart from HTML requirements and the page element keys that are required for the appliance's administrative web interface, you are free to use or remove any of the optional page element keys provided by the template and to modify the template as much as you like.

Right-click this link and select "Save Link As" or "Save Target As" to download the Block Page Template.

Important
If you plan to use a custom template, it is strongly recommended that you download the Sophos template, available from the preceding link rather than using a template from another source. Sophos cannot be held responsible for any malicious or problematic code included in other templates or introduced in added code. Realize that such malicious or problematic code could be distributed to many of your users if included in a custom template and, therefore, exercise caution.

Required Elements

The following elements are required:

  • DOCTYPE Declaration: The provided HTML DOCTYPE declaration of XHTML 1.0, Strict, is required. You should not change this.
  • <div id="main" class="[full|mini]"> ... </div>: This <div> tag can be used with the class attribute set to full. It will be automatically set to mini when the page is shown in an iframe. By default, the full option displays any graphics within these tags and contains no iframe layout settings. By default, the mini option hides any graphics within this tag and includes iframe layout settings, making this section full page width. The CSS settings controlling these options can, however, be modified.

    This tag must wrap the visible content of the notification page, with the exception that banner or background images may be placed before this <div> tag.

  • %%sophos_blockpage_content%%: This page element key must appear within the <div id="main" class="[full|mini]"> ... </div> tags. This content includes text entered in the Text explanation text box.
  • %%sophos_warn_proceed_content%%: This page element key must appear within the <div id="main" class="[full|mini]"> ... </div> tags if you wish to use the Warn option in any of the policy pages.
  • %%sophos_feedback_content%%: This page element key must appear within the <div id="main" class="[full|mini]"> ... </div> tags if you wish to enable the Allow user feedback option in any of the policy pages.
  • %%sophos_quota_proceed_content%%: This page element key must appear within the <div id="main" class="[full|mini]"> ... </div> tags if you wish to use the Quota time option in any of the policy pages.
Note
Server-side scripting is not supported within this block page template.

Optional Elements

The following page element keys are available:

  • Client-side scripting: You may add client-side scripting, such as JavaScript.
  • %%title%%: It is suggested that you use this in the <head> section of the template. It provides the appropriate <title> for the block pages. Also, this page element key can also be used within the <div id="main" class="[full|mini]"> ... </div> tags of the template. In this location, it provides the appropriate in-page heading for the block pages. As this key is replaced with plain text, you may choose to wrap it in a div or heading tag; for example:
    <h1>%%title%%</h1>
    This content is drawn from text entered in the Page title text box.
  • %%server_address%%: This page element key provides the fully qualified domain name (FQDN) of the Web Appliance. It is an essential initial part of the URL for any of the Sophos-supplied graphics, but the use of these is optional. If you continue to use any of these graphics, you must retain this page element key, as well as the rest of the URL for the graphic, /resources/images/[filename.ext]. For example:
    %%server_address%%/resources/images/SophosImageFile.jpg
  • %%image_asset%%: This page element key is used as the base URL for any graphic that you have uploaded in the Images section of the Advanced tab in the Configuration > Accounts > Notification Page Options page. You must complete this URL by adding a slash (/) and the full filename of the uploaded graphic, for example:
    %%image_asset%%/MyImageFile.jpg
  • %%user_name%%: This page element key provides the name of the user who has made the request for the blocked page, as provided by Active Directory. If Active Directory is not available, the IP address from which the request was made will be displayed instead.
  • %%user_ip%%: This page element key provides the IP address from which the request for the blocked page has been made.
  • %%user_workstation%%: This page element key provides the hostname from which the request for the blocked page has been made. If this cannot be determined, the IP address will be displayed instead.
  • %%sophos_block_text%%: This page element key provides the reason that a requested page has been blocked.
  • %%logo%%: This page element key calls the logo set in the Global Options tab of the Configuration > Accounts > Notification Page Options page. This page element key is replaced with a string for the logo image like <img src=”path_to_logo/logo_filename” />. Note that the Display logo on notification pages option must be enabled on the Global Options tab for this page element key to work.
  • %%alert_icon_class%%: This page element key may be used as the value for the class attribute of the div to specify the display of an alert icon.