We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 46950
    • 86 Posts
    I have this problem for a long time and in differet versions of ModX Revo I installed. If I put a picture in a static TV (i.e. the pic is in a stic file on the server), then in the front end screen I see many different symbols instead of the picture. Looks like ModX doesn't understand that it's a picture end put it to the screen as a text file even though I put the input and output types as "picture". (Sorry, some names here may sound a bit different from what is used in the English version of ModX because I use the Russian version and so give these names in my out translation.) You can see what I have on the screen instead of a picture here: http://artinox-td.ru/modx/ Every advice is welcome except for reinstalling ModX becuse I've tried it several times.
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Image TVs are "static" by default, you don't need to make them static. All an image-type TV does is store the path to the image.

      By defining it as a "static" TV, you're telling MODX to use the actual content of the file being pointed to, so it displays the binary code instead of just returning the path to the image.
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 46950
        • 86 Posts
        Quote from: sottwell at Jul 15, 2014, 04:09 AM
        Image TVs are "static" by default, you don't need to make them static. All an image-type TV does is store the path to the image.

        By defining it as a "static" TV, you're telling MODX to use the actual content of the file being pointed to, so it displays the binary code instead of just returning the path to the image.
        Bur if I don't mark it as static, then I simply won't see the field where I can choose the pic file.
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          If it's an image-type TV, then you will see the arrow to click to get the file browser. You can either use the whole "Filesystem" media source, or create a media source just for the images for your resources. You can also upload files from that file browser.

            Studying MODX in the desert - http://sottwell.com
            Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
            Join the Slack Community - http://modx.org
            • 46950
            • 86 Posts
            Quote from: sottwell at Jul 15, 2014, 04:59 AM
            If it's an image-type TV, then you will see the arrow to click to get the file browser. You can either use the whole "Filesystem" media source, or create a media source just for the images for your resources. You can also upload files from that file browser.
            Hmm... it may be the source of my troubles! Could you give me a screenshot where you choose the type of a TV -- will it be an image or not?
              • 4172
              • 5,888 Posts
                -------------------------------

                you can buy me a beer, if you like MIGX

                http://webcmsolutions.de/migx.html

                Thanks!
                • 46950
                • 86 Posts
                Quote from: Bruno17 at Jul 15, 2014, 07:01 AM
                http://rtfm.modx.com/revolution/2.x/making-sites-with-modx/customizing-content/template-variables/template-variable-input-types#TemplateVariableInputTypes-Image
                Unfortunately the screen I see when I'm adding a new TV looks a bit different. Maybe because my version is 2.2.14? I attach a part of the screen I see as a a picture here. To make all words understandable for this community, I translated all words into English and wrote them with red letters above the originals.
                  • 28042 ☆ A M B ☆
                  • 24,524 Posts
                  It's not all that much different. The Input Type dropdown is much the same. Just choose "image". Then assign the TV to the templates that your resources are using, and edit the resources. They'll now have the image TV like I showed.
                    Studying MODX in the desert - http://sottwell.com
                    Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                    Join the Slack Community - http://modx.org
                    • 46950
                    • 86 Posts
                    Quote from: sottwell at Jul 15, 2014, 09:18 AM
                    It's not all that much different. The Input Type dropdown is much the same. Just choose "image". Then assign the TV to the templates that your resources are using, and edit the resources. They'll now have the image TV like I showed.
                    as you can see on the screenshot, I have already chosen "Image". I cannot assign the TV to my templates, after pressing "Save" I simple receive "Error!" Maybe it's because the TV is still almost empty? Anyhow the only dropdown to choose a picture I see only on the General Information tab. And if I choose it there, the result will be the same as I had before.
                      • 46950
                      • 86 Posts
                      Odd is the fact that on another hosting it works very well after making this TV static a choosing a picture in the General Information tab. Unfortunately this hosting has some problems with access rights (it's on a private server). The version of ModX I installed there is 2.2.11. Sometimes it works very slowly. http://wa18.ru/modx/index.php?id=7 (the picture of a smiling tooth in the top left corner)