Quote from: alik at Feb 02, 2010, 03:37 AM
Designers usually mark different levels in a document tree with specific templates. Provided that your project does so (documents within each level are marked with its own template), then you can simply filter out docs of unwanted levels:
[[Ditto? ... &depth=`X` &filter=`template,Y,1` ... ]]
The above grabs all docs to X’s depth, but throws out all those whose template is not equal to Y. Template is a numerical value -- you need to check in manager (or even in DB) the correct template id used for docs of X’s level.
This is useful advice, thanks.
Do you (or anybody else) know whether it is possible to use the filter parameter to exclude ’container pages’ (but not the documents within each container)?
I’d like to use Ditto to set up a simple blogging system, but I’m a little concerned that, several years down the line, that the folder with the blog pages will start to get a bit unwieldy (if not for MODx itself, certainly for the human editors), by containing a large number of documents. I figured that a workaround could be to create a new folder/container for each year, within the main blog folder. The content of all of the folders could be aggregated by Ditto using the depth parameter, and also has (what I see as, for news) the advantage of including the year in the document URL.
However, first attempts show that the container/folder ("pseudo-article") for the year itself also gets aggregated into the Ditto blog output, which is undesirable. Is there a way to filter out each of the containers from the output, and only include their child pages? (I intend to only have one level of sub-folders (ie, a folder for each year), nothing more complicated than that.)
Thanks for any advice.