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

    I am trying to make an <a> image link in a TPL chunk that is being called via getResources. The image is not showing up. I'm not sure where or what the problem is...could someone help?

    the getResources call in the main template:
    [[!getResources?
                      &showHidden=`1`
                      &tpl=`FictionListTpl`
                      &sortby=`menuindex` 
                      &sortdir=`ASC`
                      &tplLast=`FictionListLastTpl`
                      &includeTVs=`2` 
                      &processTVs=`2`
                      &tvPrefix=``
                      &debug=`1`
                      ]]


    the 'FictionListTPL' TPL chunk:
                    <!-- BEGIN STORY BLURB -->
                    <div id="story-blurb">
                        <a href="[[~[[+id]]]]" title="[[+pagetitle]]"><img src="[[+FictionStoryArtThumb]]" width="220" height="220" /></a>
                        <div id="blurb">
                            <h2>Novel Excerpt</h2>
                            <a href="[[~[[+id]]]]" title="Read [[+pagetitle]]" id="read">Read</a>
                            <h1><a href="[[~[[+id]]]]">[[+pagetitle]]</a></h1>                        
                            <p>[[+introtext]]</p>
                        </div>
                    </div><!-- END STORY BLURB -->
                  <hr>


    the TV 'FictionStoryThumb' which has
    'Input options' set as :
    - input type: Image
    - base Path: set to directory where images go for this section
    base path relative - yes,
    base URL: set to same directory where images go for this section
    base url relative: yes,
    prepend URL if No Beginning/: yes

    'Output options' set as:
    output type: set to 'image'
    everything else is blank or default values

    'Template Access' has been associated with proper document template

    I really need to figure this part out ASAP so I can move on with the rest of the site, any help is greatly appreciated!

    thanks,
    noooob
      • 3749
      • 24,544 Posts
      When the output type is set to "image" the rendered output is a full image tag, so you can't embed it in another image tag. You can do a "view source" to see if that's the problem.

      You can either change the output type to "default" or change the Tpl chunk to expect a full tag.
        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting