We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 39059
    • 11 Posts
    @Micro, yup, that's exactly what I was wanting, I am actually surprised at how simple it was, from the research I did previously on TV's, I would not have thought it was possible to do this, but I can see now that it's just that the documentation leaves much to be desired, it wasn't clear enough, but by going through this process, I can see how much can be done with TV's. I did take over this website project from someone else, and they were using TV's, but I don't believe they understand them either. They were using a lot of chunks and other "re-usable code" methodology, but they were only using these things one time, which means they were doing more work than was necessary for what they were needing.

    Well, anyways, I went through this whole process, and unfortunately, while I do see why it SHOULD work, it's not doing it, and I don't know why. Do you have any ideas? I did have to install the IF package, but thankfully I was aware that the usage of the IF chunk you gave me was not a native ModX function, but one that requires the additional package. Other than that, I can't think of any reason why it wouldn't work, short of a syntax problem, but as far as my little knowledge of ModX goes, it looks fine to me, but admittedly, my experience is limited to the past couple of weeks of messing around with ModX. I know there are times when you use + and times when you use *, but I just tried it with both and it doesn't work.
      • 19369
      • 1,098 Posts
      Can I see the output?
      Maybe wrong path in the file browser?
        • 39059
        • 11 Posts
        Errg, I neglected to change the [[*image]] to [[*myImage]]

        However, now that I did that, it is trying to load an image named
        'http://localhost/cvasa/%3Cimg%20src='

        instead of the filename, with corresponding path.

        ...we're getting closer!

        FYI, I placed the [[IF.... ]] code in the template itself, rather than a chunk, I don't know if that makes a difference or not?

        !! (I just fixed it, so I hope updating this post with an edit, instead of creating a new post is fine)

        In trying to troubleshoot the problem, I changed the output type of the TV to Image, instead of Default. So, the <img src= ... coding was not necessary, and was causing the latest error. Once I took that stuff out, it worked fine, if I wanted to, I can change the output back to default and put the <img src= code back in place, and I' sure it would work fine that way too. [ed. note: rolaaus last edited this post 14 years, 6 months ago.]
          • 19369
          • 1,098 Posts
          The forum eats MODX code, you need to wrap it using the "Inser Code" icon.
          It doesn't change anything if you use it on a Template or in a Chunk, a Chunk is just an include.