We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 35571
    • 2 Posts
    I am facing a very peculiar issue with a chuck which calls a TV.
    TV name = “footer_text” - used to get footer text from the user (website editor).
    Chunk name = “chunk_footer_text” - places a call ( [[+footer_text]] ) to the TV.
    Chunk name = “footer” – places a call to getResources (detailed below)
    [[!getResources?
    &showHidden=`1`
    &resources=`[[$settings_page_id]]`
    &tpl=`chunk_footer_text`
    &includeTVs=`1`
    &processTVs=`1`
    &tvPrefix=``
    &parents=``
    &depth=`1`
    &includeContent=`1`
    ]]

    The footer works fine with first level pages which do not have a child. When a page with child pages are encountered, the footer is displayed along with the array output in debug mode at the bottom of the page just below the footer.
    The debug stuff is iterated through all child pages, producing the array output for all child pages under the parent page. Example out below:
    Array
    (
    [tpl] => chunk_footer_text
    [tplOdd] =>
    [tplFirst] =>
    [tplLast] =>
    [sortby] => publishedon
    [sortbyTV] =>
    [sortbyTVType] => string
    [sortbyAlias] =>
    [sortbyEscaped] => 0
    [sortdir] => DESC
    [sortdirTV] => DESC
    [limit] => 5
    [offset] => 0
    [tvFilters] =>
    [depth] => 1
    [parents] =>
    [includeContent] => 1
    [includeTVs] => 1
    [showHidden] => 1
    [showUnpublished] =>
    [showDeleted] =>
    [resources] => 17
    [processTVs] => 1
    [tvPrefix] =>
    [idx] => 1
    [first] => 1
    [last] => 2
    [toPlaceholder] =>
    [toSeparatePlaceholders] =>
    [debug] =>
    [where] =>
    [id] => 41
    [type] => document
    [contentType] => text/html
    [pagetitle] => Our History
    [longtitle] => Our History
    [description] => Our History
    [alias] => our-history
    [link_attributes] =>
    [published] => 1
    [pub_date] => 0
    [unpub_date] => 0
    [parent] => 2
    [isfolder] =>
    [introtext] =>
    [content] => This is our history page.
    [richtext] => 1
    [template] => 5
    [menuindex] => 0
    [searchable] => 1
    [cacheable] => 1
    [createdby] => 1
    [createdon] => 2011-08-26 20:26:16
    [editedby] => 0
    [editedon] => 0
    [deleted] =>
    [deletedon] => 0
    [deletedby] => 0
    [publishedon] => 2011-08-26 20:26:16
    [publishedby] => 1
    [menutitle] => Our History
    [donthit] =>
    [privateweb] =>
    [privatemgr] =>
    [content_dispo] => 0
    [hidemenu] =>
    [class_key] => modDocument
    [context_key] => web
    [content_type] => 1
    [uri] =>
    [uri_override] => 0
    [footer_text] =>
    )

    Some one please shed some light on this.
      • 33982 ☆ A M B ☆
      • 476 Posts
      I ran into this same problem awhile back as well. Been looking for the solution this morning, but I believe I had to put &parents=`-1` ... try that out and let me know if it works.
        Precision Web Development ... SmashStack.com
        • 33982 ☆ A M B ☆
        • 476 Posts
        Looked around a little more and I found the site where I had that same problem. Yeh, the solution above I provided was what fixed it. Here's my getResources call:

        [[getResources? &tpl=`content_tpl` &includeContent=`1` &resources=`25` &parents=`-1`]]


        25 is the MODx document where I have the content for the footer text. If you don't specify &parents=`-1`, you'll get that array output like you've got.
          Precision Web Development ... SmashStack.com
          • 35571
          • 2 Posts
          Thanks flinx777. It solved the problem. That's ingenious thinking, as far as I am concerned.