We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 7527
    • 437 Posts
    Can anyone explain how the snippet Archivist works please. I have looked at the documentation and done the following. I created a call on my page as follows:

    [[!Archivist? &parents=`9,10` &target=`19`]]


    Then on page 19 (Archives) I placed the following:

    [[!getArchives?
       &parents=`9,10`
       &toPlaceholder=`archives`
    ]]
     
    <h2>[[+arc_month_name]] [[+arc_year]] Archives</h2>
     
    [[+archives]]


    The link May 2014 appears on my pages with the first call but when clicked it takes the viewer to page 192014/05 which is blank. I want it so that when you click the link you are taken to the Archives pages on page 19 and then there will be a month breakdown of each resource placed in containers 9 and 10. I know I'm missing something but I don't know what?

    Regards,
    DS [ed. note: distant_smile last edited this post 12 years, 5 months ago.]
      www.PawsForWildlife.co.uk
      www.Borntobrick.co.uk
      • 7527
      • 437 Posts
      Is there a better way to archive my posts? Sorry I am having a bad MODX weekend, nothing seems to be working. I am sure I have followed the doc's correctly, but I still can't see where I have gone wrong?

      DS
        www.PawsForWildlife.co.uk
        www.Borntobrick.co.uk
        • 7527
        • 437 Posts
        Ok so I scratched the whole thing. Then I found this link:

        http://www.bitego.com/weblog/2014/01/22/create-a-stylish-news-archive-with-articles-and-archivist.html#footercontact

        I ended up with my Archives page having the following:

        <div class="newsarchivecontainer">  [[!Archivist? &parents=`9,10` &target=`40` &limit=`0` &groupByYear=`1` &tpl=`ArchivistRowTpl` &yearGroupTpl=`ArchivistYearGroupTpl` ]]</div>


        And this correctly showed the box with the month and news number. So all was great. I then added this to ID 40 (the target):

        <div class="newscontainer">[[!getPage? &element=`getArchives` &parents=`9,10` &showHidden=`1` &pageVarKey=`page` &toPlaceholder=`archives` &cache=`0` ]]
        <h2>News for the period [[+arc_month_name]] [[+arc_year]]</h2>
        [[+archives]]</div>
        <ul class="newspaging">[[!+page.nav]]</ul>


        When I go to my Archive page and click the little box with the month it takes me to a blank page titled:

        http://www.mydomain.co.uk//index.php?id=402014/05

        Can anyone see what I am doing wrong? I have added both chunks as described in the tutorial. My Archive page (ID 39) and Archive results page (ID 40) are both standard resources. The news articles I have are in containers (ID's 9 and 10). I have also correctly added the CSS to my style sheet.

        I know the CSS is correct as the month by month box appears fine. It just seems that when you click it, it does not take you to page 40 with the links on like it should, instead it generates a 'phantom' blank page?

        Any help would be appreciated as I am really lost on this Archivist stuff
        Regards,

        DS
          www.PawsForWildlife.co.uk
          www.Borntobrick.co.uk
          • 7527
          • 437 Posts
          I have now followed the tutorial here afresh:

          http://www.bitego.com/weblog/2014/01/22/create-a-stylish-news-archive-with-articles-and-archivist.html#footercontact

          and using some html I have managed to work it!
          DS
            www.PawsForWildlife.co.uk
            www.Borntobrick.co.uk