Hi,
i try use getArchives, but year month and day are inverted
my snippet :
[[!Archivist? &target=`12` &parents=`22` &dateFormat=`%B %Y`]]
I followed these instructions (
http://bit.ly/cPT3KN)
i create a resource "archives" (with folder check)
the url link is archives/2011/03
i have no result but i have some resources create in march.
and in the result page, the title is January Archives
i’d look in console log
i i see that the year month have inverted
SELECT `modResource`.`id`, `modResource`.`type`, `modResource`.`contentType`, `modResource`.`pagetitle`, `modResource`.`longtitle`, `modResource`.`description`, `modResource`.`alias`, `modResource`.`link_attributes`, `modResource`.`published`, `modResource`.`pub_date`, `modResource`.`unpub_date`, `modResource`.`parent`, `modResource`.`isfolder`, `modResource`.`introtext`, `modResource`.`richtext`, `modResource`.`template`, `modResource`.`menuindex`, `modResource`.`searchable`, `modResource`.`cacheable`, `modResource`.`createdby`, `modResource`.`createdon`, `modResource`.`editedby`, `modResource`.`editedon`, `modResource`.`deleted`, `modResource`.`deletedon`, `modResource`.`deletedby`, `modResource`.`publishedon`, `modResource`.`publishedby`, `modResource`.`menutitle`, `modResource`.`donthit`, `modResource`.`haskeywords`, `modResource`.`hasmetatags`, `modResource`.`privateweb`, `modResource`.`privatemgr`, `modResource`.`content_dispo`, `modResource`.`hidemenu`, `modResource`.`class_key`, `modResource`.`context_key`, `modResource`.`content_type` FROM `modx_site_content` AS `modResource` WHERE ( ( `modResource`.`deleted` = 0 AND `modResource`.`published` = 1 AND `modResource`.`parent` IN (22,23,24,34) AND (`modResource`.`context_key` = ’web’ OR EXISTS(SELECT 1 FROM `modx_context_resource` `ctx` WHERE `ctx`.`resource` = `modResource`.`id` AND `ctx`.`context_key` = ’web’)) ) AND `modResource`.`hidemenu` = 0 AND `modResource`.`isfolder` = 0 AND ( FROM_UNIXTIME(`publishedon`,
"%m") = "2011" AND FROM_UNIXTIME(`publishedon`
,"%d") = "03" ) ) ORDER BY publishedon DESC LIMIT 10
I do not see where I could be wrong.
in my template archive i have this snippet :
[[!getPage?
&element=`getArchives`
&elementClass=`modSnippet`
&tpl=`tplBlogArchivist`
&hideContainers=`1`
&pageVarKey=`page`
&parents=`22`
&includeTVs=`1`
&toPlaceholder=`archives`
&limit=`10`
&cache=`0`
]]
<h3>[[+arc_month_name]] [[+arc_year]] Archives</h3>
[[+archives]]
[[!+page.nav:notempty=`
<div class="paging">
<ul class="pageList">
[[!+page.nav]]
</ul>
</div>
`]]
thanks for your help.
Laurent
modx revo 2.0.7 pl