Status code Portlet

From Sense/Net Wiki
Jump to: navigation, search
  •  
  •  
  •  
  •  
  • 100%
  • 6.0
  • Enterprise
  • Community
  • Planned

Overview

Status Code Portlet
Status code Portlet is responsible for setting HTTP status code for the page after rendering. It sets the given code no matter your site is running locally on your computer or it is published to a public domain.
This portlet commonly used for creating custom error pages.

Details

Properties

Property Property name for embedding Possible values Description
Status code StatusCode positive whole number Status code to be set for the page
Sub status code SubStatusCode positive whole number Sub status code to be set for the page.
If you don't want to use sub status code then it's value has to be 0.

User group informations

for Portal builders

If you want to embed your Status code portlet into your pagetemplates somewhere, look at the following markup. The attributes/options and the range of their accepted values are the same as above (don't forget to include a unique ID and runat="server" attributes!) It should be hidden because it has no visual functionality.

This portlet works only if you put it into a zone.

Example

<snpe:StatusCodePortlet
   Title="Status Code"
   ID="statusCode"
   runat="server"
   ChromeType="None"
   StatusCode="404"
   SubStatusCode="0"
/>

Example/Tutorials

As a logged in administrator switch to Edit mode then choose Edit from the portlet options. Under the Other section you can set any HTTP status code and HTTP sub status code.

On localhost HTTP status code is set to 200.

Error page for end users

Related links

References