The procedure of adding and editing an HTTP response code custom page is short and easy when compared to creating panels. These types of variants, also have selection rules and contextual objects. The main configuration consists of a only variant name and the response code used on this path. (See figure 13.13)

There are three options for response codes: 404 page not found, 403 access denied and 301 redirect. The redirect option allows you to enter a path to which the user should be redirected. You may enter internal as well as external paths and you may use tokens provided by contextual objects.


Figure 13.13: The settings for custom pages of the HTTP response code type all fit within one page. Sweet.

How can this be used?
A website using nodes to build a catalogue of external web pages of interest for visitors, may use a redirect variant to send any visitor clicking on a node to the site it links to.
The same site may have another variant to check if the active user is allowed to edit the node, and if so redirect to the edit page instead.

When links are built, Drupal normally checks if the acting user is allowed to visit the target page. If the resulting page is a redirect, Drupal will only check if the redirect is accessible, not the page it ends with. Thus, you may end up displaying links leading to access denied pages if using redirects too vigorously.

Other modules using Page manager

Apart from Panels and Page manager, the only module providing variant types (known to the author) is Contextual Administration.

It is used to:

  • build customized administration pages, for example to create new nodes with node references pre-populated,
  • account creation pages where roles are set and hidden,
  • placing an add term page in a section of the site where the terms actually are used.

Your site administrators will be happier if you learn to use it well.

AttachmentSize
12.13 http response page.png33.83 KB

Comments

kopeboy’s picture

How to show a message after the redirect?

kopeboy’s picture

Hello?

marco.b’s picture

I recommend trying to display the message with help of rules module.

– Greetings from Frankonia –
"A decision is mostly a good decision if it leads to more opportunities.”
Heinz von Foerster (Kybernetiker)