We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 5699
    • 46 Posts
    computersolutions.cn Reply #1, 19 years, 8 months ago
    I have the photo’s uploaded using an image tv, but if I try use the tv, Modx will get smart and give me the <img src="...">.

    Anyway to get the content of the tv without the extraneous bits?
    I’m using a chunk to display output, and wanted to hook in lightbox.

    eg
       <div id="tvProductPicbig">
      <a href="[*tvProductPicbig*]" rel="lightbox"  title="[*tvProductTitle*]">[*tvProductPicMed*]</a></div>
     </div>
    





      • 17883
      • 1,039 Posts
      Afair you only get the adress of the image when using an image TV. But you DON´T have to choose anything from the "display format" dropdown (so don´t use a widget).
        • 25663 MODX Staff
        • 12,272 Posts
        Correct. I use this all the time (Image input widget but no output widgets).
          Ryan Thrash, MODX Co-Founder
          Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
          • 5699
          • 46 Posts
          computersolutions.cn Reply #4, 19 years, 7 months ago
          I see.

          However, is there any reasonable way to get the content of the field?
          I have places where I want the "widget" output, and places where i need the raw filepath.



            • 25663 MODX Staff
            • 12,272 Posts
            You’d need to use two TVs for that, one of which could use @EVAL to get the content of the other.
              Ryan Thrash, MODX Co-Founder
              Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
              • 17855
              • 43 Posts
              Hi - sorry to reopen this one and I have posted about this elsewhere and know some of it but not all...

              Thought you might be able to help.

              I am trying to acheive the same thing as computersolutions.cn and want to use the @EVAL method suggested being rather new to all this I am having some problems.

              I have been trying approaches using

              $modx->getTemplateVar($idname='projectImageMap')


              but to no avail I just cant get it right.... did you get it working and if so what do you suggest.

              I am new and at a loss!

              Thanks and best -