[Zope3-dev] plus plus at at under under at at under under at at plus slash

Steve Alexander steve@z3u.com
Fri, 01 Aug 2003 19:18:30 +0300


> For a lot of the applications we deploy, we have administration screens 
> that are usually in a path called 'admin'.  They often live in or near 
> the same space as the public site, but has their own look and feel.  I 
> still want to tell my customers to go to 'www.example.com/admin/' 
> instead of 'www.example.com/++skin++admin/admin/'.

You can use a marker interface and a simple custom traversal component 
to achieve exactly the effect you describe.

Mark your folder (perhaps your root folder) with an interface 
IFolderThatHasAnAdminSubpath. This interface should extend IFolder.

Then register a traversal component that derives from the standard 
folder traversal component, but has a special case for the "admin" name 
that sets the skin in the request to the one you require for the admin 
interface.

I'd estimate around 10 lines of code, at most 20.

--
Steve Alexander