We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 742
    • 12 Posts
    I am trying to set up an article index with a picture and summary text, HOWEVER, the content in the TVs isn’t showing up on the article index page. All placeholder info shows up fine. I used the sample code from the documentation as my guide:

    I created a TV and named it page-thumbnail and gave it the input type: Image

    I created 2 chunks per the instructions in the documentation:

    I created a chunk and named it list-docs-thumb

    <div class="list-docs thumb grid">
    [[!getResources?
    &parents=`[[*id]]`
    &tpl=`list-docs-thumb-tpl`
    &limit=`100`
    &sortdir=`ASC`
    &includeTVs=`1`
    &includeContent=`1`
    &depth=`0`
    &sortby=`menuindex`
    ]]
    </div>

    I created a second chunk for the getResources template, named it: list-docs-thumb-tpl. I am using the introtext for something else, so I created a TV called "article-summary" for the summary text.

    <div class="list-item column span-6">
    <h2>[[+pagetitle]]</h2>
    <a href="[[~[[+id]]]]" title="[[+pagetitle]]">
    <img src="[[phpThumbOf? &input=`[[+tv.page-thumb]]` &options=`&w=153&h=200&zc=1`&onlysrc=`1`]]"alt="[[+pagetitle]]"/>
    </a>
    <p>[[*article-summary]]</p>
    </div>

    I then added this to the article index page
    [[$list-docs-thumb]]

    The article index page shows the pagetitle and a place for the image defaulting to the alt text, but it does not show the image, or the content from the article-summary TV.

    Any suggestions?
      • 8609
      • 607 Posts
      Two things, you need to add &processTVs=`1` to your call, and you need to use the correct syntax in your chunk to reference your article-summary TV - [[+tv.article-summary]]

      <div class="list-docs thumb grid">
      [[!getResources?
      &parents=`[[*id]]`
      &tpl=`list-docs-thumb-tpl`
      &limit=`100`
      &sortdir=`ASC`
      &includeContent=`1`
      &includeTVs=`1`
      &processTVs=`1`
      &depth=`0`
      &sortby=`menuindex`
      ]]
      </div>


      <div class="list-item column span-6">
      <h2>[[+pagetitle]]</h2>
      <a href="[[~[[+id]]]]" title="[[+pagetitle]]">
      <img src="[[phpThumbOf? &input=`[[+tv.page-thumb]]` &options=`&w=153&h=200&zc=1`&onlysrc=`1`]]"alt="[[+pagetitle]]"/>
      </a>
      <p>[[+tv.article-summary]]</p>
      </div>
        • 742
        • 12 Posts
        Thank you so much! That worked like a charm...

        I also changed the image call to:

        <img src="[[+tv.page-thumbnail]]" alt="[[+pagetitle]]"/>

        YOU ROCK -

        I could so kiss you for this!
          • 8609
          • 607 Posts
          Glad it worked smiley Edit the title of your original post and add [SOLVED]

          Quote from: ajp1126 at Apr 10, 2011, 02:03 PM

          Thank you so much! That worked like a charm...

          I also changed the image call to:

          <img src="[[+tv.page-thumbnail]]" alt="[[+pagetitle]]"/>

          YOU ROCK -

          I could so kiss you for this!