navigation dissappears on empty folder workaround?
Tim Tisdall
tisdaltn at mcmaster.ca
Wed Jun 13 20:00:48 UTC 2007
Okay, I've looked through the SVN trunk again and found the following:
folderish = getattr(aq_base(context), 'isPrincipiaFolderish',
False) and not INonStructuralFolder.providedBy(context)
if folderish:
return '/'.join(context.getPhysicalPath())
else:
return '/'.join(aq_parent(context).getPhysicalPath())
This is good, but how could I also include the case when the folder is
empty? Or does the INonStructuralFolder account for this too? For example,
you'd probably want to list subfolder/subtopics in a smart folder when they
exist, but if they don't exist I'd like to display the parent folder instead
of nothing. Displaying an empty navigation doesn't seem particularly
useful.
-Tim
On 6/13/07, Martin Aspeli <optilude at gmx.net> wrote:
>
> Alexander Limi wrote:
> > On Tue, 12 Jun 2007 12:50:09 -0700, Dack
> > <tisdaltn at mcmaster.ca> wrote:
> >
> >> I have my navigation menu set up to only display the contents of the
> >> current
> >> folder. When you view a folder that is empty the navigation portlet
> >> dissappears. Normally, this isn't a big deal but it becomes a big
> >> problem
> >> if you set a Smart Folder as a the default view on a folder.
> >
> > This is a bug, and was recently fixed in Plone 3 SVN.
>
> I don't think so, as in ... I don't think it's a bug, and I don't think
> the behaviour has been changed. There's an open issue about this for
> comment, which I can't find right now, but search for it.
>
> Martin
>
> --
> Acquisition is a jealous mistress
>
>
> _______________________________________________
> Product-Developers mailing list
> Product-Developers at lists.plone.org
> http://lists.plone.org/mailman/listinfo/product-developers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.plone.org/pipermail/plone-product-developers/attachments/20070613/013d82f6/attachment-0001.html>
More information about the Product-Developers
mailing list