Personal tools
You are here: Home dk Work Documentation How-tos Creating a home folder
Document Actions

Creating a home folder


This How-to is intended for: Any audience.

How to place all content within a home folder and have that served as the site root

Make A Subfolder A Navigation Root

(Current as of Plone 2.5.2)

Occasionally, you may want to make a folder within a Plone site appear to be the root level of the navigation. In order to do this, you'll need to find the folder in the ZMI, click the "Interfaces" tab and add the Products.CMFPlone.browser.interfaces.INavigationRoot interface. This will make the navigation portlet, breadcrumbs, sitemap, and logo link, act as if this folder is the root of the site whenever someone views either this folder or an object contained within it. See http://plone.org/documentation/manual/plone-developer-reference/specific-areas/navigation-structures/navigation-root for more information.

Minor tweaks

Site Map

The Site Map portal_action links to the portal site map, not the one for your current navigation root. To fix this, go to portal_actions and change the URL (Expression) for Site Map to string:${globals_view/navigationRootUrl}/sitemap

The same can apply to the other portal_action links. By default, they point to the Plone root. You can change the URL for any of these to make them appear to be a part of this subsite without recreating the actual content. Zope's inheritance will take care of this for you.

By default, the navigation portlet displays the title of your subsite root instead of "Home" like it does for the portal root. To fix this, customize plone_portlets/portlet_navigation, changing

                   <div class="visualIcon contenttype-plone-site" tal:attributes="class typeClass">
<a class="visualIconPadding"
tal:attributes="href root/absolute_url;
title portal/Description;
class string:$selectedClass visualIconPadding;">
<span tal:omit-tag=""
tal:condition="python:root == portal"
i18n:translate="tabs_home">Home</span>
<span tal:condition="python:root != portal"
tal:replace="root/Title">Home</span>
</a>
</div>

to

                   <div class="visualIcon contenttype-plone-site">
<a class="visualIconPadding"
tal:attributes="href root/absolute_url;
title portal/Description;
class string:$selectedClass visualIconPadding;">
<span tal:omit-tag=""
i18n:translate="tabs_home">Home</span>
</a>
</div>

This method comes from https://weblion.psu.edu/trac/weblion/wiki/MakeAsubfolderAnavigationRoot

How to root plone to a sub-folder (Out of Date)

History

We started out doing this in a brute force fashion. Several sites such as Marillac and designKiln were done in this fashion, and should be converted to the new way.


Old way that we implemented this on marillac, designkiln, etc

This step fixes where the navigation bar points for the 'home' link

portal_properties/navtree_properties

change root seeting to '/home'


This step fixes where the 'home' tab points

change url_expression in portal_actions for item Title Home:

from: string:${globals_view/navigationRootUrl}

to: string:$portal_url

This step fixes where the breadcrumb points for the 'home' link

customize /portal_skins/plone_templates/global_pathbar

<!-- change "href naviagtion_root_url" to "href portal_url" to rehome site to /home subfolder -->
<a i18n:translate="tabs_home" tal:attributes="href portal_url">Home</a>


Powered by Plone CMS, the Open Source Content Management System

This site conforms to the following standards: