Last updated Apr 30th, 2019 | Page history | Improve this page | Report an issue
Support the team building MODX with a monthly donation.
The budget raised through OpenCollective is transparent, including payouts, and any contributor can apply to be paid for their work on MODX.
$292 per month—let's make that $500!Learn more
This snippet displays monthly or yearly archive links.
Simply place the snippet wherever you would like to display archive listings in, the parents to grab archives from, and a target resource to load the archives using the getArchives snippet.
[[!Archivist? &target=`123` &parents=`4,12,33`]]
|tpl||The chunk that will be used to display each month/year result.||row|
|target||The Resource that the getArchives snippet is called on, that will display the results of the archive filter.|
|parents||Comma-delimited list of ids serving as parents.|
|depth||Integer value indicating depth to search for resources from each parent.||10|
|sortBy||The field to sort and group results by.||publishedon|
|sortDir||Order which to sort by. Defaults to DESC.||DESC|
|limit||Limits the number of resources returned.||10|
|start||Optional. An offset of resources returned by the criteria to skip.||0|
|useMonth||If 1, will use the month in the archive list.||1|
|useDay||If 1, will use the day in the archive list.||0|
|dateFormat||Optional. The date format, according to MySQL DATE_FORMAT() syntax, for each row. If blank, Archivist will calculate this automatically.|
|useFurls||If true, will generate links in pretty Friendly URL format.||1|
|extraParams||Optional. If specified, will attach this to the URL of each row.|
|cls||A CSS class to add to each row.||arc-row|
|altCls||A CSS class to add to each alternate row.||arc-row-alt|
|firstCls||Optional. A CSS class to add to the first row. If empty will ignore.|
|lastCls||Optional. A CSS class to add to the last row. If empty will ignore.|
|filterPrefix||The prefix to use for GET parameters with the Archivist links. Make sure this is the same as the filterPrefix parameter on the getArchives snippet call.||arc_|
|toPlaceholder||If set, will set the output of this snippet to this placeholder rather than output it.|
|setLocale||If true, Archivist will run the setlocale function with your cultureKey setting if your cultureKey is not "en".||true|
|grSnippet||The name of the snippet used to list results.||getResources|
There is 1 chunk that is processed in Archivist. Its corresponding Archivist parameter is:
- tpl - The Chunk to use for each result displayed.
Display a list of months for archives for Resources under IDs 2, 4 & 6, and when clicked, go to page 123:
[[!Archivist? &target=`123` &parents=`2,4,6`]]