We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 40568
    • 20 Posts
    Thanks lukemcd, but I can't get mine to work.
    I have this on the home page to pull Articles from articles pages.
    [[!getResources? &parents=`1` &limit=`10` &tpl=`newsTPL` &includeContent=`1` &showHidden=`1`]]





    This is my newsTPL chunck:

    <div class="news">
      <img src="[[getResourceField:default=`/images/pic-placeholder.png`:phpthumbof=`w=220&h=180`? &field=`ArcticleImage` &isTV=`1`]]" />
    <div class="story">
      <div class="date">[[+publishedon:strtotime:date=`%b %d %Y`]]</div>
      <h2><a href="[[~[[+id]]]]" title="[[+pagetitle]]">[[+pagetitle]]</a></h2>
      <p class="summary">[[+introtext]]</p>
      <p class="readmore"><a href="[[~[[+id]]]]"><span>Read more »</span></a></p>
    </div>
    [[$share]]
     
      <div class="clear"></div>
    </div>
    <hr/>


    I want it towards if there is no main picture on the article page it will default to pic-placeholder.png. Any help on that would be much appreciated. Thanks!
      • 1343 ☆ A M B ☆
      • 2,213 Posts
      You need to add &processTvs=`1` to the snippet call.
        Patrick | Server Wrangler
        About Me: Website | Tweets |  MODX Hosting
        • 40568
        • 20 Posts
        Quote from: AMDbuilder at Nov 14, 2012, 01:57 PM
        You need to add &processTvs=`1` to the snippet call.

        Thanks AMDbuilder but it didn't work. I even tried to add &processTvs=`1` inside the chunk.

        Snippet call on home page
        [[!getResources? &parents=`1` &limit=`10` &tpl=`newsTPL` &includeContent=`1` &showHidden=`1` &isTV=`1` &processTvs=`1`]]


        Chunk(newsTPL):
        <div class="news">
          <img src="[[getResourceField:default=`/images/pic-placeholder.png`:phpthumbof=`w=240&h=120`? &field=`ArticleImage` &isTV=`1` ]]" />
        <div class="story">
          <div class="date">[[+publishedon:strtotime:date=`%b %d %Y`]]</div>
          <h2><a href="[[~[[+id]]]]" title="[[+pagetitle]]">[[+pagetitle]]</a></h2>
          <p class="summary">[[+introtext]]</p>
          <p class="readmore"><a href="[[~[[+id]]]]"><span>Read more »</span></a></p>
        </div>
        [[$share]]
         
          <div class="clear"></div>
        </div>
        <hr/>



        This is the article on articlepage.html

        <img class="pic-right" src="[[*ArticleImage]]" alt="" />
        <p>paragraph</p>