We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 38547
    • 98 Posts
    Hey gadgetto thanks for you code.

    I spent hours trying to get the pagination to work and then I came across this post copied your getpage code and now have exactly what I was after.

    What this forum needs is somewhere full of code examples so people like me who do this mnore out of interest have a number of working examples to get things up and running.

    Thanks for the that.

    Cheers

    Ian
      • 42802
      • 96 Posts
      Sebastian Zahn | ingroove.uy Reply #12, 10 years, 5 months ago
      I get the same error, an array... any help?

      Thanks!!

      Quote from: intandem at Nov 28, 2012, 01:16 PM
      I am trying to use Archivist for the first time but the getArchives page is returning an array.

      The archive navigation itself is working (and thanks to Gadgetto's post above I have it grouped by year) but my output when I select an archive is as follows:

      November 2012 Archives
      Array
      (
      [tpl] =>
      [tplOdd] =>
      [tplFirst] =>
      [tplLast] =>
      [sortby] => publishedon
      [sortbyTV] =>
      [sortbyTVType] => string
      [sortbyAlias] =>
      [sortbyEscaped] => 0
      [sortdir] => DESC
      [sortdirTV] => DESC
      [limit] => 5
      [offset] => 0
      [tvFilters] =>
      [tvFiltersAndDelimiter] => ,
      [tvFiltersOrDelimiter] => ||
      [depth] => 10
      [parents] => 22
      [includeContent] =>
      [includeTVs] =>
      [includeTVList] =>
      [showHidden] => 1
      [showUnpublished] =>
      [showDeleted] =>
      [resources] =>
      [processTVs] =>
      [processTVList] =>
      [prepareTVs] => 1
      [prepareTVList] =>
      [tvPrefix] => tv.
      [idx] => 1
      [first] => 1
      [last] => 1
      [toPlaceholder] => archives
      [toSeparatePlaceholders] =>
      [debug] =>
      [where] => ["FROM_UNIXTIME(`publishedon`,\"%Y\") = \"2012\"","FROM_UNIXTIME(`publishedon`,\"%m\") = \"11\""]
      [dbCacheFlag] => 0
      [context] =>
      [tplCondition] =>
      [tplOperator] => ==
      [conditionalTpls] =>
      [filterField] => publishedon
      [filterPrefix] => arc_
      [tagKey] => tags
      [tagKeyVar] => key
      [tagRequestParam] => tag
      [tagSearchType] => contains
      [odd] => 1
      [id] => 253
      [type] => document
      [contentType] => text/html
      [pagetitle] => A Whole New Look Appassionata online & live in the shop
      [longtitle] => Just in time for you at Christmas
      [description] =>
      [alias] => a-whole-new-look-appassionata-online-and-live-in-the-shop
      [link_attributes] =>
      [published] => 1
      [pub_date] => 0
      [unpub_date] => 0
      [parent] => 22
      [isfolder] =>
      [introtext] => And so it is Christmas....
      [richtext] => 1
      [template] => 11
      [menuindex] => 3
      [searchable] => 1
      [cacheable] => 1
      [createdby] => 1
      [createdon] => 2012-11-28 04:28:40
      [editedby] => 1
      [editedon] => 2012-11-28 04:28:52
      [deleted] =>
      [deletedon] => 0
      [deletedby] => 0
      [publishedon] => 2012-11-28 10:28:00
      [publishedby] => 1
      [menutitle] =>
      [donthit] =>
      [privateweb] =>
      [privatemgr] =>
      [content_dispo] => 0
      [hidemenu] => 1
      [class_key] => modDocument
      [context_key] => web
      [content_type] => 1
      [uri] => a-whole-new-look-appassionata-online-and-live-in-the-shop.html
      [uri_override] => 0
      [hide_children_in_tree] => 0
      [show_in_tree] => 1
      [properties] =>
      )



      My call is:

      [[!getArchives?
         &parents=`22`
         &toPlaceholder=`archives`
         &showHidden=`1` 
      ]]
       
      <h2>[[+arc_month_name]] [[+arc_year]] Archives</h2>
       
      [[+archives]]





      If I add &tpl=`newsArchiveTpl` into the getArchives call, I get:

      ()



      Any idea what I'm doing wrong? Thanks!
        • 10378
        • 375 Posts
        Quote from: zzseba at Nov 22, 2013, 01:10 PM
        I get the same error, an array... any help?

        Thanks!!

        If an array is displayed, the most common error is a missing chunk.
        If you follow the hints above, it should work as expected. If not, you need to provide more informations (eg. post your source code) so that we can help.

        regards,
        Martin
          Freelancer @bitego http://www.bitego.com
          ---
          GoodNews - one of the most advanced and integrated Group Mailer premium add-ons for MODX Revolution!
          More infos here: http://www.bitego.com/extras/goodnews/
          • 21671
          • 244 Posts
          Hey All,

          I can't get Archivist to work properly. I am using revo 2.31.

          example page is at http://c1274.paas2.tx.modxcloud.com/news/

          on News page, my snippet call is:
          [[!Archivist? &target=`307` &parents=`2`]]


          The snippet call on archives page (with id of 307) is:
          <h2>[[+arc_month_name]] [[+arc_year]] Archives</h2>
          [[!getArchives? &parents=`2` ]]


          No posts get outputted on target page
            • 10378
            • 375 Posts
            Quote from: noahlearner at Aug 27, 2014, 02:48 PM
            Hey All,

            I can't get Archivist to work properly. I am using revo 2.31.

            example page is at http://c1274.paas2.tx.modxcloud.com/news/

            on News page, my snippet call is:
            [[!Archivist? &target=`307` &parents=`2`]]


            The snippet call on archives page (with id of 307) is:
            <h2>[[+arc_month_name]] [[+arc_year]] Archives</h2>
            [[!getArchives? &parents=`2` ]]


            No posts get outputted on target page

            Is the parent with ID 2 an Articles container? If so, you need to add this param to your getArchives call (see a few post above):

            &showHidden=`1`


            Also I have written a complete tutorial for Archivist, which you can read here:
            http://www.bitego.com/weblog/2014/01/22/create-a-stylish-news-archive-with-articles-and-archivist.html
              Freelancer @bitego http://www.bitego.com
              ---
              GoodNews - one of the most advanced and integrated Group Mailer premium add-ons for MODX Revolution!
              More infos here: http://www.bitego.com/extras/goodnews/
              • 21671
              • 244 Posts
              Hey Martin,

              No Joy. I created chunks to match yours on thy blog page. please check results on page I linked to above. I am willing to pay for a fix.

              -N
                • 21671
                • 244 Posts
                Well I feel dumb...I just needed to assign a tpl to the getarchives snippet call on the archives page.
                  • 10378
                  • 375 Posts
                  Well - if you choose MODX as your CMS you can't be that dumb... smiley

                  I don't want to think about how often I struggle with simplest errors I produced for myself...
                    Freelancer @bitego http://www.bitego.com
                    ---
                    GoodNews - one of the most advanced and integrated Group Mailer premium add-ons for MODX Revolution!
                    More infos here: http://www.bitego.com/extras/goodnews/