[Zope-CMF] Re: [Plone-users] navigation slot forced to show current folder and subfolders only ?

Kalyan Jammigumpula kalyan at srcc.lsu.edu
Mon May 24 15:56:45 EDT 2004


I dont know about Plone1 but you could do that in Plone2 by changing one 
  word. All you have to do is change a line of code in 
portlet_navigation.pt (in your ZMI click  portal_skins then on 
plone_portlets, click on portal_navigation.pt click customize.). It can 
be also found on your filesystem in you CMFPlone/skins/plone_portlets/ 
folder. Make sure you always have a backup copy before you change. Look 
for code similar to code below.

<div metal:define-macro="portlet"
        i18n:domain="plone"
        tal:omit-tag=""
        tal:define="isContainer here/isPrincipiaFolderish|nothing;
                    navBatchStart request/navBatchStart | python:None;
                    portalObject portal;
                    tree 
python:here.plone_utils.createNavigationTreeBuilder(portalObject,navBatchStart);
                    showOtherNav python:0;
                    showNav python:0;
                    listContentsPermission python:checkPermission('List 
folder contents', here);

change
python:here.plone_utils.createNavigationTreeBuilder(portalObject,navBatchStart);
to
python:here.plone_utils.createNavigationTreeBuilder(here,navBatchStart);
It works for me in plone2. I have never played with plone1. So, I am 
sorry on that front.
Disadvantage is that navigation slot is empty when folder is empty.
Kelley, Sean wrote:
> I want to have the navigation portlet display only the current folder 
> and subfolder items in Plone 1 and ultimately Plone 2.  How do I set the 
> menu to display this way in a particular folder?  I have a copy of 
> main_template in this folder now.  Where can I hard code the url?
> 




More information about the Zope-CMF mailing list