We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 42689
    • 125 Posts
    Hello everyone .. smiley

    I have an problem .. i am using getResources and i want to add tv with getResources ..

    my code is
    [[!getResources? &parents=`16` &tpl=`News`&showHidden=`1`&includeContent=`1`&includeTVs=`1`&processTVs=`1`]]


    i am using this for my news listing on my website ..
    This code for news listing on my news page

    <ul class="news">
        <li><img src="[[+pagebanner]]" />
    		<div class="content">
            <h2>[[+pagetitle]]</h2>
            <p>[[+description]]</p>
            <span><a href="index.php?id=[[+id]]">View More...</a></span> </div>
    	</li>
    </ul>


    I counld not see the my news image which is uploaded in pagebanner TV ..


    Plz Help .. smiley

    Thanx [ed. note: chirag_wgsol last edited this post 13 years, 8 months ago.]
      • 36996
      • 211 Posts
      a small error
      <ul class="news">
          <li><img src="[[+pagebanner]]" />
              <div class="content">
              <h2>[[+pagetitle]]</h2>
              <p>[[+description]]</p>
              <span><a href="index.php?id=[[+id]]">View More...</a></span> </div>
          </li>
      </ul>

      you need to use the "+" token instead of "*" in placeholders
      also you have includeContent twice in your snippet call.
        • 42689
        • 125 Posts
        Yeah i have correct my mistake
        i have used "+" token

        and
        i have also used includeContent
        [[!getResources? &parents=`16` &tpl=`News`&showHidden=`1`&includeContent=`1`&includeTVs=`1`&processTVs=`1`]]


        But there are still image are missing ..

        Thanx
          • 36996
          • 211 Posts
          So what output do you get for the image?
            • 42689
            • 125 Posts
            i have get the output of using this code
            <ul class="news">
                <li><img src="[[+pagebanner]]" />
                    <div class="content">
                    <h2>[[+pagetitle]]</h2>
                    <p>[[+description]]</p>
                    <span><a href="index.php?id=[[+id]]">View More...</a></span> </div>
                </li>
            </ul>


            title of the page
            description of the page
            view more link ..

            But i did not get the image of that page which i have upload in "pagebanner" TV ..

            Plz Help .. smiley
              • 36996
              • 211 Posts
              I meant the output, on the client side
                • 36996
                • 211 Posts
                No problem, I mean what do you get in the src of the img, is it empty or does it contain some url
                  • 42689
                  • 125 Posts
                  Oh,
                  Yeah i get empty src in image ..
                    • 36996
                    • 211 Posts
                    Check your tv name, maybe it's wrong.
                    also make sure that the tv's input type is image and the output type is default.

                    I totally forgot, you need to add to your snippet call:
                    &tvPrefix=``
                    [ed. note: nir-z last edited this post 13 years, 8 months ago.]
                      • 42689
                      • 125 Posts
                      Hello nir-z,

                      Thanx for your reply,

                      i have check my TV name is pagebanner and also check input type or output type .. after that i have also user
                      &tvPrefix=``
                      in snippet

                      For example :-
                      [[!getResources? &parents=`16` &tpl=`News`&showHidden=`1`&includeContent=`1`&includeTVs=`1`&processTVs=`1`&tvPrefix=`tv`]]


                      my chunk code is

                      <ul class="news">
                          <li><img src="[[+pagebanner]]" />
                      		<div class="content">
                              <h2>[[+pagetitle]]</h2>
                              <p>[[+description]]</p>
                              <span><a href="index.php?id=[[+id]]">View More...</a></span> </div>
                      	</li>
                      </ul>


                      But the probleum is still here .. Not showing image ..

                      Plz help smiley