2018-04-27, 08:43

Feb 27, 2012 — Notify Users module, ver. 0.5 released — user can choose between sending single message (...) »

2013-01-28, 08:32

19 студзеня 2013 у Гродне трагічна загінуў паэт, журналіст і мой сябар (...) »

2009-10-14, 07:19

The site Litaratura.org is devoted to Belarusian literary works and translations. (...) »

2009-01-12, 20:46

Late November 2008 marked the 20th anniversary of the official founding of the Belarusian (...) »

Registered User Area Log into This Site
Show Credits... Credits
Worthwhile Services
Refresh My Local Time (GMT+1)... Apr 27, 2018 — 08:43
  • Austria (1)
    Bulgaria (1)
    Norway (1)
    Sweden (2)
    United States (7)
  • Today (114)
  • Yesterday (451)
~ / Public Domain Software / Extensions to Ditto / Newest Documents $_
Newest Documents
Click To View A Full Size Image...
2010-01-10, 15:17

This solution was initially provided to the MODx user Sharkbait who asked „how to pull each first/newest document from different containers”.

I am pasting here the directory structure of Sharkbait’s photo gallery that the solution was designed for:

Example of directory structure

GalleryOverview (id=10)
    Portrait 1
    Portrait 2
    Landscape 1
  Black & White
    Black & White 1

We need to retrieve in a single and concise step newest documents from each folder under „GalleryOverview” — one latest document for each subfolder. This might be done as follows:

Main Ditto call

[[Ditto? &parents=`10` &depth=`2` &display=`all` &filter=`isfolder,1,1` &tpl=`newest-doc`]]

This call of Ditto collects all subfolders under „GalleryOverview” and these collected subfolders are subsequently explored by „newest-doc” chunk for the latest document:

Content of „newest-doc” chunk

[[Ditto? &parents=`[+id+]` &depth=`1` &display=`1` &filter=`isfolder,0,1` &tpl=`doc-template` &sortBy=`createdon` &sortDir=`DESC`]]

Click to show a form...Click to hide the form... Write a comment
  • Required fields are marked with *.
  • Comments are published after the approval of the site owner, who is a human rather than a wind-fast computer program so please be patient.

* Code:
Get another image...Enter this code into the appropriate field of the form while submitting an e-mail or a comment. If you have trouble with reading it, generate another...