We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 6573
    • 28 Posts
    Hey,

    I’ve Made a chunk that displays a list of partners the only thing is I can’t get the images to load, Is there some variable I can append to "assets/images/partners/newgrounds.gif" to make it find it. Or which directory are chunks called from? The chunk is being embedded in my template.
      • 29181
      • 480 Posts
      Hi,
      a chunk is just a piece of HTML code (as you know if you’ve created one).

      To that end, if you want to display an image you will have to use an img tag:

      <img src="assets/images/partners/newgrounds.gif" title="New grounds" alt =" New Grounds">


      or am I missing something?

      Taff
        Adrian Lawley: www.adrianlawley.com
        • 7231
        • 4,205 Posts
        Check if you have the / before the reference, that will not work in MODx site, I think it has to do with the base tag. I ran into this problem and this resolved it.


        assets/images/partners/newgrounds.gif -> this works

        /assets/images/partners/newgrounds.gif -> this will not


          [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

          Something is happening here, but you don&#39;t know what it is.
          Do you, Mr. Jones? - [bob dylan]
          • 6726
          • 7,075 Posts
          Indeed if you have relative path enabled not slash at the beginning, and if it’s not enabled prepend with [(site_url)], e.g [(site_url)]assets/images/partners/newgrounds.gif and it should work... but relative path are better since you can move your site without having to edit all paths...
            .: COO - Commerce Guys - Community Driven Innovation :.


            MODx est l&#39;outil id
            • 6573
            • 28 Posts
            This is what I’ve got in the chunk, I have friendly urls enabled if that makes a difference

             <div id="partners_container" align="center" >
                <h2>Our Partners</h2>
                <div id="partner"><a href="http://www.newgrounds.com/"><img src="assets/images/partners/newgrounds.gif" alt="NewGrounds" width="88" height="31" /></a> </div>
                <div id="partner"><a href="http://www.modxcms.com/"><img src="assets/images/partners/modx.png" alt="Modx" width="88" height="31" longdesc="http://www.modxcms.com" /></a> </div>
                <div id="partner"><a href="http://www.ilo-nz.net/"><img src="assets/images/partners/ilo-nz.png" alt="ilo-nz" width="88" height="31" longdesc="http://www.ilo-nz.net/" /></a> </div>
            </div>


            If I put some text in there beside the image tag the text shows up but the image still doesn’t
              • 33337
              • 3,975 Posts
              Are you sure, images actually reside on the server under assets/images/ ?
                Zaigham R - MODX Professional | Skype | Email | Twitter

                Digging the interwebs for #MODX gems and bringing it to you. modx.link
                • 6573
                • 28 Posts
                yep there defiantly there
                  • 6726
                  • 7,075 Posts
                  That’s really strange... it should work.
                  Do you have any funky tweaks in your .htaccess ?

                  Could we get an url ?
                    .: COO - Commerce Guys - Community Driven Innovation :.


                    MODx est l&#39;outil id
                    • 6573
                    • 28 Posts
                    I found the problem it was my choice of directory name, apparently images in the folders
                    named partners are blocked by Ad block plus. I’m so sorry I wasted everyones time embarrassed

                    That’ll teach me to try and keep my images organized!
                      • 33337
                      • 3,975 Posts
                      Quote from: darkmikey at Sep 02, 2007, 04:36 AM

                      I found the problem it was my choice of directory name, apparently images in the folders
                      named partners are blocked by Ad block plus. I’m so sorry I wasted everyones time embarrassed

                      That’ll teach me to try and keep my images organized!
                      Oops...

                      Hey no problem, sometimes it happen to us too tongue ... its good to know you finally got it to work wink

                      Happy MODx’ing.
                        Zaigham R - MODX Professional | Skype | Email | Twitter

                        Digging the interwebs for #MODX gems and bringing it to you. modx.link