Skip to content
Provides a base class for folderish content types based on B-trees
Python
Find file
Latest commit cc5b9fa Apr 26, 2016 @mauritsvanrees mauritsvanrees Back to development: 1.0.9
[ci skip]
Failed to load latest commit information.
docs Update license to GPL version 2 only. Jul 16, 2010
src/plone Update tests to use the new layers Mar 7, 2016
var move buildout into the package itself in order to avoid externals (an… Apr 8, 2009
.gitattributes Allowed union merge strategy in CHANGES.rst. Oct 25, 2015
.gitignore add ignores Nov 14, 2014
CHANGES.rst Back to development: 1.0.9 Apr 26, 2016
CONTRIBUTING.rst Added CONTRIBUTING.rst. Nov 14, 2015
MANIFEST.in txt to rst May 11, 2015
README.rst doc style for README, add note about sources Jul 27, 2015
bootstrap.py update [http://svn.zope.org/zc.buildout/trunk/bootstrap/bootstrap.py Jan 27, 2010
buildout.cfg don't pull in all of plone when we actually only need zope itself... Jan 27, 2010
setup.cfg txt to rst May 11, 2015
setup.py

README.rst

plone.folder

Overview

This package provides a base class for folderish content types based on B-trees, a.k.a. "large folders" in Plone. Storing content in such folders provides significant performance benefits over regular folders. However, "large folders" do not support explicit ordering of their contents out-of-the box. That is, you cannot manually specify the order of items within the folder, you can only sort things according to a given criteria after fetching items from the folder.

Many times, though, it is desirable to be able to explicitly order a folder's content, for example for items that are related to site navigation. Sorting alphabetically often doesn't make sense here.

To compensate plone.folder provides ordering support for B-tree folders via the above mentioned base class, which can make use of an adapter to store the actual order information. It also comes with two sample adapter implementations:

  • A default adapter handling order information for all objects contained in a folder. This adapter can be used to build fully backwards-compatible drop-in replacements for folderish content. In other words, when using this adapter B-tree-based folders should behave just like the "regular" folder implementation, but provide some of the performance benefits at the same time.
  • An alternative adapter implementation that is targeted towards sites with only a relatively small percentage of content for which (explicit) order matters. It'll only manage order information for certain content types (via a marker interface).

The latter allows to not having to separate such content from "non-orderable" content. Up to now many large sites ended up storing "orderable" items — for example everything related to navigation and typically only a few — in regular folders and the bulk of the content in "large" folders, most of the time solely for performance reasons. This adapter will hopefully help avoid having to make this distinction in the future and still provide the better performance characteristics of B-tree folders.

Source Code

Contributors please read the document Process for Plone core's development

Sources are at the Plone code repository hosted at Github.

Something went wrong with that request. Please try again.