We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 35985
    • 33 Posts
    I thought what I was trying to accomplish was a simple and common thing. After browsing the forums for a solution for hours I thought Id try an new thread so I can figure what im doing wrong.

    I am using GetResources to call a summary of my would-be articles or resources. The call is:

       [[!getResources? &showHidden=`1`  &parents=`10`  &tpl=`articleTpl` &includeContent=`1` &includeTVs=`1` &processTVs=`1`  ]]    


    The text is showing but not the images.. I have tried using standard images and that works but I would like to use the Gallery. I set my Template Variable to input as a GalleryItem and output as an Image. I have tried the basic call

      <img src="[[+tv.Article_Pic]]" />  



    My TV is Article_Pic and have put:

     <a href="[[~[[+id]]]]"><img class="alignleft" title="[[+tv.article_image_title]]"   src="[[+tv.Article_Pic]]"  /></a>    


    into my ArticleTpl used by my getResources call. I have explored work arounds which dont quite work right and have tried a ton of alternatives.

    With &processTVs, without, tried syntax changes... tried using Phpthumbof in case the size was throwing things off... I have tried changing the output of the GalleryItem, etc.

    I am about to give up using Gallery altogether which seems a waste considering im probally just making a mistake in the syntax somewhere. Any help please?!! Thanks

    http://www.shopcoop.org/

    This question has been answered by Shopcoop. See the first response.

      • 35985
      • 33 Posts
      I have inspected the Html generated and all I get is

        <img src="<img src=" assets="" components="" gallery="" connector.php?action="web/phpthumb&w=216&h=162&f=png&src=%2Fassets%2Fcomponents%2Fgallery%2Ffiles%2F1%2F3.JPG"" alt="testing testing" title="The THIRD pic" class="">  


      so obviously the call is working, but I just want the image. I have triple checked and the TV output is set to image. So how do I get it to display just the image?
      • discuss.answer
        • 35985
        • 33 Posts
        OK now using the [[*Artilce_Pic]] and removing &processTVs=`1` my article page I can get each image successfully called to the page, BUT how do I get the individual pictures to show as a thumbnail in my GetResources call? Should I abandon trying to call the image the way I have been doing and try using PhpThumbof? I thought Gallery uses PhpThumbOf, why wont it work in a GetResources call? Suggestions anyone? Im sure Im not the only one trying to do this.
          • 35985
          • 33 Posts
          SOLVED::


          Calling the TV by itself in the ArticleTpl is the solution... funny no one has noticed this or mentioned this in previous threads, must have missed this. I do however have to Css it to get it to look right.

            [[+tv.Article_Pic]]  


          with ProcessTVs=`1`
            • 36675
            • 56 Posts
            I have also been using this solution, but when I updated to 2.2 and installed !Articles, the galleryItem TV call just not seem to work.

            All I get is the database value parsed
              • 35985
              • 33 Posts
              Articles has an option in the settings to Process the TV which will solve that for you!

              Cheers!