I'm getting the feeling that people aren't actually reading my email...  I
am NOT trying to place a folder within a smart folder.  I'm placing a smart
folder within a regular folder and making it the default index.  When the
default index is a smart folder, all of the current folder's contents
dissappear because the navigation treats the smart folder as a folder.  If
the smart folder is a folder, it shouldn't be assignable as a default index,
and if it can be used as a default index than you should be able to treat it
as a regular page...   In other words, when you go into the folder, you see
the smart folder in the middle and the contents of the directory in the
navigation!

   However, my immediate concern is how to add a "and not empty" to the if
statement I mentioned in my first email.  Maybe it makes no sense to you,
but it would work perfectly for me.  I just don't know the internal workings
of Plone enough to compose the proper syntax.


   As to making no sense, though...  When you view a page or anything that's
non-folderish, you view that items PARENT CONTENTS in the navigation.  So,
viewing the parent's contents when there's nothing in the current folderish
item makes perfect sense.  It's also far more useful than making the
navigation disappear.  Here's a person who created their own portlet to do
exactly what I'm describing: 
http://plone.org/documentation/how-to/creating-a-flat-nagivation-portlet/  
(and before you say it, I'd rather modify the current plone implementation
of the navigation by adding half a line than use this deprecated method of
listing navigation items)



Martin Aspeli wrote:
> 
> Tim Tisdall wrote:
>>    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.
> 
> I don't think that helps. Having any empty folder show its parent 
> contents makes no sense (not even as an option).
> 
> If I'm understanding your report correctly, the problem is that you have 
> a folder for which there are no "eligible" children (i.e. either there 
> are none, or the ones that are there are filtered out, either because of 
> the fact that a default-page isn't shown, or because a btree folder 
> doesn't list its children, or because all children are of types that are 
> filtered out). If there are no children to show, the navtree is hidden.
> 
> Take a look at https://dev.plone.org/plone/ticket/6647#comment:5
> 
> Martin
> 
> 
> -- 
> Acquisition is a jealous mistress
> 
> 
> _______________________________________________
> Product-Developers mailing list
> [email protected]
> http://lists.plone.org/mailman/listinfo/product-developers
> 
> 

-- 
View this message in context: 
http://www.nabble.com/navigation-dissappears-on-empty-folder-workaround--tf3909594s20094.html#a11120659
Sent from the Product Developers mailing list archive at Nabble.com.


_______________________________________________
Product-Developers mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/product-developers

Reply via email to