You are here: Home / Documentation / How To's / How to create a microsite

How to create a microsite

by nguyen — published Oct 12, 2008 03:25 PM, last modified Aug 16, 2016 10:50 AM
if you want a Plone site to contain many semi-self-contained microsites

Create the folder 

In your Plone site's root folder, create a folder that will shortly become a microsite, or go to an existing folder that you want to turn into a microsite.  Let's say for argument's sake that the folder is called "Microsite Folder" and has the URL "microsite-folder".

Make the folder a site root

Go to the URL bar of the browser and append "/manage_main" to the folder's URL.  Assuming your Plone site is at "http://bla.com", the resulting URL should be "http://bla.com/microsite-folder/manage_main".  

That takes you to the ZMI view of the folder.  Click on the Interfaces tab.  In the Avaliable Markers section of the page, search for "INavigationRoot", check the box next to it, and press the Add button.  

Go back to the folder's normal URL, http://bla.com/microsite-folder.  You should now no longer see anything connected with the main site's contents at http://bla.com; only what is in the microsite folder and below should be visible.

Fixing the Events portlet

If you have the events portlet showing in the microsite folder, you'll note that it lists events throughout the global site, not just events in the microsite.  The easiest way to fix that is to hide the events portlet in your microsite, using the Manage Portlets link, then add your own microsite events collection and your own microsite events portlet.  Here's how:

  • In the microsite, add a collection called "Microsite Events" (the ID will be "microsite-events").  You'll want to copy the criteria of the global events collection added to all Plone sites: "item type" : "events", "state" : "published", "start date" : "relative, now, greater than".  You'll want to add a new criterion: "location" : ".." (two dots) and check the "include subfolders" box.  Make the sorting criteria "Start date".  Save the collection.  The location criterion limits the collection to showing events in the microsite only, not events above the microsite (ie. not events in the global site).
  • Publish the microsite events collection.
  • Using the Manage Portlets link, add a collection portlet, call it "Upcoming Microsite Events", and enter "microsite-events" as the ID.  When you hit Enter you should see a list of matching objects; check the box next to the one located at http://bla.com/microsite-folder/microsite-events.  Press Save.

You should now see a new Upcoming Microsite Events portlet that shows only the events in the microsite.  

Fixing the News portlet

Do the same thing for News Items as you did for Events above.

Note: When creating the news portlet you will not use the start date criteria and you should set the sort order to created date or something other than start date. -Jeff

Site map

The site map will show items from the entire site, not the microsite.  This seems sensible.

Search

Search results will come back for the entire site, not just the microsite, unless you check the box "only in this section", in which case the search results will come back only for items in the microsite.

More Information from WebLion

"We've been wrestling with subsite theming in Plone 3 for a while. Our wiki outlines different approaches that we've tried. Maybe our "subsite theming lite" method would work for you? It certainly does 2, and I can think of fudges that could hook the other things off this."

 


Navigation