Making sub-sites out of Plone folders or containers

published Nov 29, 2008, last modified Jun 26, 2013

For when you need to divest a portion of your site into an altogether separate site.

Sometimes, you run into the need to promote a section of your site into a site proper.  This site is a good example.  It's subdivided into English and Spanish folders.  Since it makes no sense to present those folders to visitors, I'd love if people visitiing either the English or the Spanish site to get the impression that those "folders" are really separate "sites".

Now you can.  It's not that difficult:

  1. Go to the Zope Management Interface.
  2. Open the folder or container that you want to make a "site root".
  3. Click on the Interfaces tab.
  4. Now add the plone.app.layout.navigation.interfaces.INavigationRoot interface.

Presto!  When visitors come to your "sub-site" (through whatever vehicles or means), the logo will link to the sub-site folder instead of to the root of the site, the breadcrumb will do the right thing, and so will the navigation portlets.  My suggestion: to convey the illusion of a separate site, you may want to skin that subfolder differently from the main site (I'm still stuck on that part, but I will post suggestions as soon as I know how to do it).

It's really, really awesome.  You can combine this with your VirtualHostMonster to make separate subdomains (though a fix for the "subdomain" problem that exists with the login cookie still is pending on my to-do list).