We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 3749
    • 24,544 Posts
    If your news pages don't have a parent, create a new resource (let's call it News Folder) and in the Resource tree, drag the news stories and drop them on the News Folder. They should be its children. Put the ID of the News Folder in the &parent property.

    It doesn't matter where the chunk is, it will be found by name.
      Did I help you? Buy me a beer
      Get my Book: MODX:The Official Guide
      MODX info for everyone: http://bobsguides.com/modx.html
      My MODX Extras
      Bob's Guides is now hosted at A2 MODX Hosting
      • 42689
      • 125 Posts
      I have a home page .. at there i have putt the that code
      [[!getResources? &parents=`7` &limit=`3` &sortby=`createdon` $tpl=`MyNewsChunk`]]
      


      Then i have creat the new page with the name of news and news page if is "7" .. after that i have a creat new page with the name of firt news--> with select the parent of news page ..

      after that when i save my home page file and preview it ... there are show array result some thing like that :-

      Array
      (
          [tpl] => 
          [tplOdd] => 
          [tplFirst] => 
          [tplLast] => 
          [sortby] => publishedon
          [sortbyTV] => 
          [sortbyTVType] => string
          [sortbyAlias] => 
          [sortbyEscaped] => 0
          [sortdir] => DESC
          [sortdirTV] => DESC
          [limit] => 3
          [offset] => 0
          [tvFilters] => 
          [tvFiltersAndDelimiter] => ,
          [tvFiltersOrDelimiter] => ||
          [depth] => 10
          [parents] => 7
          [includeContent] => 
          [includeTVs] => 
          [includeTVList] => 
          [showHidden] => 
          [showUnpublished] => 
          [showDeleted] => 
          [resources] => 
          [processTVs] => 
          [processTVList] => 
          [prepareTVs] => 1
          [prepareTVList] => 
          [tvPrefix] => tv.
          [idx] => 1
          [first] => 1
          [last] => 1
          [toPlaceholder] => 
          [toSeparatePlaceholders] => 
          [debug] => 
          [where] => 
          [dbCacheFlag] => 0
          [context] => 
          [tplCondition] => 
          [tplOperator] => ==
          [conditionalTpls] => 
          [odd] => 1
          [id] => 8
          [type] => document
          [contentType] => text/html
          [pagetitle] => first news
          [longtitle] => 
          [description] => 
          [alias] => 
          [link_attributes] => 
          [published] => 1
          [pub_date] => 0
          [unpub_date] => 0
          [parent] => 7
          [isfolder] => 
          [introtext] => 
          [richtext] => 1
          [template] => 1
          [menuindex] => 0
          [searchable] => 1
          [cacheable] => 1
          [createdby] => 1
          [createdon] => 2013-02-02 07:02:42
          [editedby] => 0
          [editedon] => 0
          [deleted] => 
          [deletedon] => 0
          [deletedby] => 0
          [publishedon] => 2013-02-02 07:02:42
          [publishedby] => 1
          [menutitle] => 
          [donthit] => 
          [privateweb] => 
          [privatemgr] => 
          [content_dispo] => 0
          [hidemenu] => 
          [class_key] => modDocument
          [context_key] => web
          [content_type] => 1
          [uri] => 
          [uri_override] => 0
          [hide_children_in_tree] => 0
          [show_in_tree] => 1
          [properties] => 
      )
      




      Plz tell me how can i solve this probleum ..? and get the result ..

      thanx in advance
        • 3749
        • 24,544 Posts
        That means it's not finding your Tpl chunk. The name in the &tpl property in the snippet tag does not match the name of the chunk you created (or you haven't created the MyNewsChunk chunk). Cut and paste the name from one place to the other.
          Did I help you? Buy me a beer
          Get my Book: MODX:The Official Guide
          MODX info for everyone: http://bobsguides.com/modx.html
          My MODX Extras
          Bob's Guides is now hosted at A2 MODX Hosting
          • 42689
          • 125 Posts
          i have solve the probleum ..:)

          Just change the code
          [[!getResources? &parents=`7` &tpl=`MyNewsChunk`]]
          


          Now the first three news is display at my home page .. smiley Thanx a lots BobRay


          Now if i want to add the image also with my news ..then how can it possible ..?

          Thanx
            • 3749
            • 24,544 Posts
            You can put the image in a Template Variable (TV). See the "TV' properties here: http://rtfm.modx.com/display/ADDON/getResources
              Did I help you? Buy me a beer
              Get my Book: MODX:The Official Guide
              MODX info for everyone: http://bobsguides.com/modx.html
              My MODX Extras
              Bob's Guides is now hosted at A2 MODX Hosting
              • 42689
              • 125 Posts
              Thanx for the your reply ..

              As i want to add the new image with each news .. As same i also want to add the each banner image with my every page ... so that how can i manage in MODx..?

              Thanx
                • 38339
                • 41 Posts
                @chirag_wgsol
                it's not very polite to the people if you ... sorry... 'spam' your same question all over the forum!!
                You want help, so 'please' respect the rules here...

                You want an image for every news? Then include it to your chunk with a TV.
                EDIT: just found the answer for this in another (of xx?) thread!!

                So I and others waste time with you!! [ed. note: manfred62 last edited this post 13 years, 8 months ago.]
                  Revolution 2.2.6
                  • 42689
                  • 125 Posts
                  i am really sorry with that kind of habit's ..
                  bt i am very new to this forum so i think there are different type of our topic's that's y i am confused or i am post my questions again and again
                    • 42689
                    • 125 Posts
                    hy BobRay

                    <p>[[+pagetitle]]</p>
                    <p>[[+description]]</p>
                    <p><a href="[[+id]]">See more . . .</a>


                    This is the code for call the chunk to our theme .. and its perfect .. smiley

                    can u tell me how can i show the content in chunk to our template ..?

                    Thanx
                      • 28042 ☆ A M B ☆
                      • 24,524 Posts
                      Have you even tried to read the official documentation? While we don't mind helping new users find their feet, it is expected that you will at least do that much. Again, the documentation for getResources will tell you how to do what you have asked.

                      http://rtfm.modx.com/display/ADDON/getResources

                      includeContent Indicates if the content of each resource should be returned in the results
                        Studying MODX in the desert - http://sottwell.com
                        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                        Join the Slack Community - http://modx.org