We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 7113
    • 27 Posts
    Quote from: splittingred at Oct 15, 2010, 08:28 AM

    1. You need to specify a &tpl property with the name of your Chunk you’re using.
    2. &extenders is not a getResources property.

    I have tried what you suggested. I input this tag;

    [[!getresources? &idx=`2` &limit=`1` &includeContent=`1` &tpl=`articleIntro`]]

    I then used the chunk with this code

    <div class="article">
            <h2 class="news-title"><a href="[[~[[+id]]]]">[[+pagetitle]]</a></h2>        
            <p class="post-info">Posted on [[+publishedon:strtotime:date=`%b %d, %Y`]]</p>
            
            <div class="news-entry">
                <p>[[+introtext]]</p>
            </div>
            
            <p class="postmeta"><a href="[[~[[+id]]]]" class="readmore">Read more</a></p>
    </div>
    


    But nothing is output


      • 28215
      • 4,149 Posts
      Quote from: derelin at Oct 15, 2010, 08:41 AM

      [[!getresources? &idx=`2` &limit=`1` &includeContent=`1` &tpl=`articleIntro`]]
      But nothing is output

      1. &idx is not a value you want to use. You should be using &parents
      2. Use [[!getResources, not [[!getresources (case-sensitivity matters).
        shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
        • 7113
        • 27 Posts
        Quote from: splittingred at Oct 15, 2010, 08:44 AM

        Quote from: derelin at Oct 15, 2010, 08:41 AM

        [[!getresources? &idx=`2` &limit=`1` &includeContent=`1` &tpl=`articleIntro`]]
        But nothing is output

        1. &idx is not a value you want to use. You should be using &parents
        2. Use [[!getResources, not [[!getresources (case-sensitivity matters).

        Okay, i managed to get a chunk tpl to display content.

        But my biggest question is this

        1- How do i display a content item (resource) that is NOT in a container? If i want to show a specific item on the frontpage/homepaghow do i specify that this particular item is the one that should be displayed?
          • 28215
          • 4,149 Posts
            shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
            • 7113
            • 27 Posts
            Quote from: splittingred at Oct 15, 2010, 09:19 AM

            http://rtfm.modx.com/display/addon/getResources/
            Thanks for the link but nothing in there explains how to show just one particular resource.

            What is there in MODx that can be used to show one resource just like in Joomla where you cn specifiy a module to show a given article link or intro by its ID?

            Or does such a simple feature not exist in MODx ?

            I’m just about giving up on MODx if I can’t get simple things accomplished. How then will i be able to implement more complex displays?
              • 28215
              • 4,149 Posts
              You should look into the getResourceField snippet.
                shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
                • 7113
                • 27 Posts
                Thanks
                  • 7113
                  • 27 Posts
                  Quote from: splittingred at Oct 15, 2010, 09:57 AM

                  You should look into the getResourceField snippet.
                  How can i get
                  getResourceField
                  to display the output pagetitle as a url to the page? Does this snippet support chunks as templates?