Re: auto-sortable folders

Encolpe Degoute <[email protected]>
Newsgroups gmane.comp.web.zope.plone.devel,gmane.comp.web.zope.plone.archetypes.devel
Message-ID <[email protected]>
Wichert Akkerman a écrit :
> Something that seems to be missing at the moment is autosorting in
> folders. There is logic to do that in both Archetypes and ATContentTypes
> but it seems to be unusable: the manage_afterAdd hook in ATCT is
> disabled, none of the options are exposed through a user interface and
> there is a distinct lack of unittests for this functionality.

> How should autosort work? 

You should sort on three attributes:
  sort: ('created', 'alpha', 'alphanum', 'modified', 'reverse_created',
          'reverse_alpha', 'reverse_alphanum', 'reverse_modified')
  sort_method: a method without argument
  sort_expression: any TALES expression with a reasonnable context

In UI, user cannot sort manually their document.

 > Is it something that we should look at implementing in ATCT trunk,
 > or does it need further work in Archetypes as well?

In ATCT.
SortFolder must be a separate type, like SmartFolder.

-- 
Encolpe Degoute
INGENIWEB (TM) - S.A.S 50000 Euros - RC B 438 725 632
17 rue Louise Michel - 92300 Levallois Perret - France
web : www.ingeniweb.com - « les Services Web Ingénieux »


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.