Back to index

plone3  3.1.7
Public Member Functions
plone.app.redirector.interfaces.IFourOhFourView Class Reference
Inheritance diagram for plone.app.redirector.interfaces.IFourOhFourView:
Inheritance graph
[legend]
Collaboration diagram for plone.app.redirector.interfaces.IFourOhFourView:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def attempt_redirect
def find_first_parent
def search_for_similar

Detailed Description

A view that supports a useful 404 page

Definition at line 10 of file interfaces.py.


Member Function Documentation

Attempt to find a single appropriate redirection target by
investigating the request.

If a redirection target is found, perform the redirect and return
True. Else, do nothing and return False.

Definition at line 14 of file interfaces.py.

00014 
00015     def attempt_redirect(self):
00016         """Attempt to find a single appropriate redirection target by
00017         investigating the request.
00018 
00019         If a redirection target is found, perform the redirect and return
00020         True. Else, do nothing and return False.
00021         """

Look at the URL given, and attempt to translate it into a partial
path. Find the first "parent" of the attempted path that is an actual
object and return it.

Returns None if no object could be found.

Definition at line 22 of file interfaces.py.

00022 
00023     def find_first_parent(self):
00024         """Look at the URL given, and attempt to translate it into a partial
00025         path. Find the first "parent" of the attempted path that is an actual
00026         object and return it.
00027 
00028         Returns None if no object could be found.
00029         """

Look at the URL given, and attempt to translate it into a partial
path. Take the id of the requested object (as it would be), and look
for other objects in the catalog with a SearchableText containing
this. If found, return the top five matches. If not, look at the
"parent" as per the attempted path, and so on. If the portal root
is reached, return an empty list.

Definition at line 30 of file interfaces.py.

00030 
00031     def search_for_similar(self):
00032         """Look at the URL given, and attempt to translate it into a partial
00033         path. Take the id of the requested object (as it would be), and look
00034         for other objects in the catalog with a SearchableText containing
00035         this. If found, return the top five matches. If not, look at the
00036         "parent" as per the attempted path, and so on. If the portal root
00037         is reached, return an empty list.
00038         """


The documentation for this class was generated from the following file: