Redirect Page

Last Updated: 10 Oct 2016

A Redirect Page allows you to include a hyperlink to an external site or internal asset within the menu of your site. This hyperlink will transparently take your users to another page or web site. For example, say you create a Redirect Page that takes the user to the Google web site.

The figure below shows that in the menu, the name of the Redirect Page (in this case, Google) appears. When the user clicks on this menu item they are taken to the Google web site.

An example of a Redirect Page
An example of a Redirect Page

If you are redirecting to an internal asset the menu name (i.e. the name of the Redirect Page) can be something different to its original name and its child assets will not appear in the menu.

Once your Redirect Page is created, you can configure its settings on its associated asset screens. The majority of these screens are the same or similar to those for a Standard Page and are described in the Asset Screens manual. In this chapter, we will describe the Details screen, which is different for a Redirect Page.

Details Screen

The Details screen allows you to configure the settings of the Redirect Page. For more information about the Status, Future Status,Thumbnail and Details sections refer to the Details Screen chapter in the Asset Screens manual.

Redirect type

This section allows you specify the type of redirect you're sending.

  • Permanent Redirect: enable this setting to send a 301 response code, indicating that the redirect is permanent (moved permanently). Disabling this setting will send a 302 response code, indicating that the redirect is temporary (moved temporarily).
Location

This section allows you specify the page you want to redirect the user to.

You can select from one of the following options:

  • URL: enter the URL of the page in this field – for example http://example.com. You should use this field when you want to redirect the user to a web site outside of your system.

    Tip: You need to include the protocol (for example http://) of the URL otherwise the Redirect Page will not work.

  • or Asset: select which asset to redirect the user to.
  • or Use query string parameters?: specify the name of the query string parameter whose value will specify the URL to redirect to. For example, if the value in this box is URL and the inbound query string to this page is ?URL=http://example.com, this page will redirect to http://example.com.
Location Options

This section allows you to enter additional information about the URL to use and set up a redirect timeout period.

The fields available are as follows.

  • URL Suffix: you can specify extra text to send as part of the URL query string in this field. Enter your key value pairs separated by an ampersand e.g. /action=send&redirectID=5. Advanced users should only use this option.
  • Pass through query string parameters?: select Yes to pass through query string parameters to the page you are redirected to. For example, if you have set this field to Yes, the URL Suffix field to ?q=Squiz+Australia and the URL to http://google.com.au/search, the user is redirected to http://google.com.au/search?q=Squiz+Australia. This will perform a search for the terms Squiz and Australia within Google.
  • Redirect Timeout: setting a value greater than zero in this field will apply a timeout on the Redirect Page, automatically redirecting a user after the specified period of time (in seconds). This allows you to display a message to users, such as You will be redirected in 5 seconds, using a Paint Layout. Please note that the use of a Paint Layout is required if a timeout has been configured in this field.

    By default, this field is set to 0 (zero), meaning that this asset will redirect immediately. This setting will have no effect if the Redirect Page's New Window option is enabled. For more information, refer to the New Window section in this chapter.
Session Variables

This section allows you to provide dynamic assignment of session variable values based on GET, POST or SESSION variables, current asset, current user, current site, set value or any super global.

The fields that are available in this section are as follows:

  • Session Variable Names: enter the names of the session variables. These names will be selectable from the Parameter menu once you have clicked Commit, allowing you to assign a value to that specific session variable.
  • Parameter: select the session variable to configure. Please note that no options will appear in this field until the names in the Session Variable Names field has been Committed.
  • Source: select the source for the selected session variable value. You can select one of the following options.
    • GET Variable Name: this allows you to enter a GET parameter.
    • POST Variable Name: this allows you to enter a POST parameter.
    • SESSION Variable Name: this allows you to enter a SESSION parameter.
    • Current Asset: this allows you to set the value of the session variable to be sourced from the Current Asset. You can source this value from either the Asset ID or a Keyword of the asset.
    • Current User: this allows you to set the value of the session variable to be sourced from the Current User. You can source this value from either the Asset ID or a Keyword of the user.
    • Current Site: this allows you to set the value of the session variable to be sourced from the Current Site. You can source this value from either the Asset ID or a Keyword of the Site.
    • Set Value: this allows you to assign a static value to the session variable. For example, if a session variable named redirect is given the value You have been redirected, using the keyword replacement %globals_session_redirect% on the redirected asset, will display this value.
    • Any Super Global: this allows you to enter a value for any of the major super global arrays. The SESSION, POST and GET variables will be checked in succession until a value is found.

To set up the session variables, enter a name for the session variable in the Session Variable Names field and click commit. The name will now be available in the Parameter field.

Select this parameter and select a Source from the second list and click Commit. An additional field will appear in the Session Variables section.

Enter the value for the source into the field. To delete a session variable, click the Delete box and click Commit.

New Window

This section allows you to specify whether or not the page will open in a new window and the settings for this new window.

The fields available in this section are as follows.

  • New Window?: select whether or not to open the Redirect Page in a new window. By default this value is No.

    Tip: If you are using a Redirect Timeout, this option must be set to No.

  • Options: this section allows you to set the options for the new window.
    • Hide Location Bar: check this box to hide the location bar on the new window.
    • Hide Menubar: check this box to hide the menu bar on the new window.
    • Hide Scrollbars: check this box to hide the scroll bars on the new window.
    • Hide Status Bar: check this box to hide the status bar on the new window.
    • Hide Tool Bar: check this box to hide the tool bar on the new window.
    • Not Resizable: check this box to make the new window not resizable.
  • Window Width: enter the width of the new window in pixels.
  • Window Height: enter the height of the new window in pixels.

Creating a Redirect Timeout Using Paint Layouts

To create a redirect timeout that shows a message to the user, follow the steps outlined below.

  1. On the Details screen of the Redirect Page enter a Redirect Timeout, for example 5.0. This will mean that when the user clicks on the Redirect Page in the menu, it will not appear until 5 seconds later.
  2. Create a Paint Layout asset and add a Type Format Bodycopy for the Redirect Page.
  3. Edit the contents of the Redirect Page Format Bodycopy and add a message to show to the user.
  4. Apply the Paint Layout to the Redirect Page. This is done on the Paint Layouts screen of the Redirect Page. For more information about this screen, refer to the Asset Screens manual.

When you preview the Redirect Page, the message defined on the Paint Layout will appear. After 5 seconds the user will be redirected to the Squiz web site.

Keyword Replacements for the Redirect Page on a Paint Layout

A list of keyword replacements is provided in the WYSIWYG Editor toolbar on the Edit Contents screen of the Redirect Page Format Bodycopy for a Paint Layout. You can use these keyword replacements in conjunction with text, images and links etc to layout what to show in the Paint Layout.

A majority of the keyword replacements that are available have the general format of %referring_asset_<keyword>% where <keyword> is a standard keyword replacement. These keyword replacements allow you to show details about the page the user was viewing before they navigated to the Redirect Page. For example if you want to show the asset name of the previous page, you can use the keyword replacement %referring_asset_name%.

Three additional keyword replacements are also available. They are as follows:

  • %javascript_redirect%: this keyword replacement defines where the JavaScript code to do the redirect should appear. This can be used to satisfy any HTML validation requirements in a Paint Layout. If the keyword is omitted, the JavaScript redirect code will appear at the bottom of the page.
  • %redirect_url% : this will show the URL of the page the user is being redirected to. This can be used in the HTML source code to show a hyperlink to the page that the user can click if they do not want to wait for the redirect to happen.
  • %redirect_assetid%: this will show the asset ID of the page the user is being redirected to.

Linking to a Redirect Page Asset in Edit+ for Squiz Matrix

When linking a Redirect Page asset within the Edit+ for Squiz Matrix interface, using the Edit+ Editor, an additional Use Redirect Link Destination field will be displayed.

This field provides you with the option of using the redirection link value as the value to print in the content. By default, this setting is enabled.


Previous Chapter Next Chapter