We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 30319
    • 406 Posts
    I'm looking to do a gR implementation to reproduce this website page:

    http://www.mountainweaversguild.org/Products/Products.html

    The left-side menu is easy, and the main content section is the same with pictures included.

    What's the correct technique to include the pictures with the li a elements created by gR??

    I've seen mentions on the internets of TVs but no clear explanations anywhere of what/how to do...

    Thank you, Tom

    This question has been answered by Bruno17. See the first response.

      • 4172
      • 5,888 Posts
      you just need to create an image-TV for your resources template and add the image-tv-placeholder to your getResurces-tpl.

      Don't forget to add the &includeTVs=`1` property to your getResources-tag.
      For more Info about getResources-properties see:
      http://rtfm.modx.com/display/ADDON/getResources
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 30319
        • 406 Posts
        How does it know which image goes with which list element??
        I read the TV display info in the above readme.
        Thank you, Tom
          • 4172
          • 5,888 Posts
          lets say you have an image-TV in your Resources, which you're listing with getResources, named myImageTV

          place this into your getResources-tpl:

          [[+tv.myImageTV]]
            -------------------------------

            you can buy me a beer, if you like MIGX

            http://webcmsolutions.de/migx.html

            Thanks!
            • 30319
            • 406 Posts
            I understand placing the image tpl/TV -- what I don't understand is how to link a specific image with a specific resource menu item.

            Please look at the URL provided -- each product has a distinct image associated with it.

            Thank you, tom [ed. note: TomMLS last edited this post 14 years, 6 months ago.]
              • 3109 ☆ A M B ☆
              • 894 Posts
              use something like this in your gR Tpl

              <li>
              <a href="[[+id]]"><img src="[[+tv.myImageTV]]" alt="[[+pagetitle]]"/></a>
              <a href="[[+id]]" >[[+pagetitle]]</a>
              </li>
              


              If your using HTML5 you can just use one a href to encapsulate both the text and the image.

              Hope that helps.
                Benjamin Marte
                Interactive Media Developer
                Follow Me on Twitter | Visit my site | Learn MODX
                • 30319
                • 406 Posts
                If not using html5 why must one have two a href links??
                What's not clear to me is how to link specific images with specific menu items.
                Thank you, Tom
                  • 17667
                  • 108 Posts
                  I think the above example should be:
                  <li>
                  <a href="[[~[[+id]]]]"><img src="[[+tv.myImageTV]]" alt="[[+pagetitle]]"/></a>
                  <a href="[[~[[+id]]]]" >[[+pagetitle]]</a>
                  </li>
                  • discuss.answer
                    • 4172
                    • 5,888 Posts
                    What's not clear to me is how to link specific images with specific menu items.

                    each menu-item is a Resource, right?
                    On each of this Resources you can choose an image with this image-TV.
                    From then on the image is linked to the resource(menu-item) with its TV.

                    If you want something else, you have to be more clear with your questions.
                      -------------------------------

                      you can buy me a beer, if you like MIGX

                      http://webcmsolutions.de/migx.html

                      Thanks!
                      • 30319
                      • 406 Posts
                      Ohhhhhhhh...the image TV is used by the resources themselves.
                      That is clearer, I need an image TV with both image and text for the alt/title tag.
                      Now I understand what to do.
                      Thank you, Tom