We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 27998
    • 4 Posts
    Hi

    Sorry to bother everyone, but I’m struggling to work out what I’m doing wrong with getresources as it doesn’t output any content. Thanks in advance for any help.

    I have placed the following call in my template:

    [[!getResources? &parents=`3` &limit=`10` &tpl=`articleheadline` &includeContent=`1` &sortby=`publishedon`]] 


    This is my `articleheadline` chunk:

    					<div class="post-title"><h2>a href="[[~[[+id]]]]">[[+pagetitle]]</a></h2></div>
    
    					<div class="post-date">18:11, Sunday, August 2, 2009 by Viktor Persson</div>
    
    					<div class="post-body">
    
    						<p><a href=""><img src="" alt="" class="bordered" /></a></p>
    
    						<p>[[+introtext:default=`[[+content:ellipsis=`400`]]`]]</p>
    
    						<a href="[[~[[+id]]]]"> class="more">Read more »</a>
    
    					</div>
      • 28215
      • 4,149 Posts
      Do the documents below ID 3 have ’Hide from Menus’ checked? If so, you need to add &showHidden=`1`
        shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
        • 27998
        • 4 Posts
        Thanks for such a speedy response - really appreciated.

        The documents under ID3 were hidden from the menu. I added &showHidden=`1` and my content now displays. Lesson learned, thanks.

        One other query though, my article header now displays the following on the front end:

        a href="index.php?id=10">test article 7

        Problem with my chunk placeholder/link? The relevant section of the chunk is:

        <div class="post-title"><h2>a href="[[~[[+id]]]]">[[+pagetitle]]</a></h2></div>
        


          • 28215
          • 4,149 Posts
          Yes, you left off the beginning < in the a tag.
            shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
            • 27998
            • 4 Posts
            Thanks splittingred - silly error. Everything is sorted and functioning. smiley