We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 2661
    • 53 Posts
    So I should be calling the TV like so (see attached screen):

    The top call is the new and improved flexible TV. The bottom is the old, rigid TV.
      • 20413
      • 2,877 Posts
      Correct! If I understand what you want to do:
      [table]
      [tr]
      [td]Name: src - [*src*][/td][td]Type: image[/td][td]Choose image through FCK browser
      [/td][/tr][tr]
      [td]Name: width - [*width*][/td][td]Type: text[/td][td]Set width
      [/td][/tr][tr]
      [td]Name: height - [*height*][/td][td]Type: text[/td][td]Set height
      [/td][/tr]
      [/table]

      in template, document:
      <img src="[*src*]" width="[*width*]" height="[*height*]" alt="[*pagetitle*]" />

      in ditto tpl:
      <img src="[+src+]" width="[+width+]" height="[+height+]" alt="[+pagetitle+]" />
        @hawproductions | http://mrhaw.com/

        Infograph: MODX Advanced Install in 7 steps:
        http://forums.modx.com/thread/96954/infograph-modx-advanced-install-in-7-steps

        Recap: Portland, OR (PDX) MODX CMS Meetup, Oct 6, 2015. US Bancorp Tower
        http://mrhaw.com/modx_portland_oregon_pdx_modx_cms_meetup_oct_2015_us_bancorp_tower
        • 2661
        • 53 Posts
        Right.

        My "src" is my 1 of 6 image TVs (firstimage, secondimage, etc). However, instead of entering a different size for every TV, I tied the size in to the Template itself so that say, all images that are on the Single Item page (where a specific Table is detailed) are the larger 400x300 size. All images on the Table Gallery page (where you can see all of the tables) are the smaller 260x15 size.

        Thanks for working this one out with me. I can’t say this will be my last question, but I’m certainly learning a heck of a lot and I’m closing in on the end of this project.
          • 2661
          • 53 Posts
          Another issue has come up because of our new way of calling the TV.

          Now, because there is always an ALT tag whether there is actually an Image there or not, I get the missing image icon. Is there a way to programatically remove the ALT tag if there is no image uploaded?
            • 2661
            • 53 Posts
            I’ll revisit your last post tomorrow. I think you are getting where I need to go.
              • 20413
              • 2,877 Posts
              Here is where PHx --> http://wiki.modxcms.com/index.php/PHx
              is your friend. I already mentioned it in the top of this thread.
              <body>
              [+phx:if=`[*someTV*]`:ne=``:then=`<img src="[*someTV*]" />`:else=``+]
              </body>
                @hawproductions | http://mrhaw.com/

                Infograph: MODX Advanced Install in 7 steps:
                http://forums.modx.com/thread/96954/infograph-modx-advanced-install-in-7-steps

                Recap: Portland, OR (PDX) MODX CMS Meetup, Oct 6, 2015. US Bancorp Tower
                http://mrhaw.com/modx_portland_oregon_pdx_modx_cms_meetup_oct_2015_us_bancorp_tower
                • 4385
                • 372 Posts
                Here is an example that I use. It uses phpThumb to make all the images I need. I use three different sizes on the plus the original uploaded size.

                <ul id="thumbnails">
                [*front_photo:is=``:then=` `:else=`<li><img class="thumbnail" title="[*pagetitle*]" alt="front design" src="[*front_photo:thumb=`&w=90`*]"></li>`*]
                [*detail_photo:is=``:then=` `:else=`<li><img class="thumbnail"  title="[*pagetitle*]" alt="detail design" src="[*detail_photo:thumb=`&w=90`*]"></li>`*]
                [*back_photo:is=``:then=` `:else=`<li><img class="thumbnail" title="[*pagetitle*]" alt="back design" src="[*back_photo:thumb=`&w=90`*]"></li>`*]
                </ul>
                
                  DropboxUploader -- Upload files to a Dropbox account.
                  DIG -- Dynamic Image Generator
                  gus -- Google URL Shortener
                  makeQR -- Uses google chart api to make QR codes.
                  MODxTweeter -- Update your twitter status on publish.
                  • 2661
                  • 53 Posts
                  Quote from: mrhaw at Sep 01, 2009, 12:06 AM

                  Here is where PHx --> http://wiki.modxcms.com/index.php/PHx
                  is your friend. I already mentioned it in the top of this thread.
                  <body>
                  [+phx:if=`[*someTV*]`:ne=``:then=`<img src="[*someTV*]" />`:else=``+]
                  </body>


                  Is that an actual call? I just need to replace the "someTV" portions? I’m sorry, I’m not at all familiar with PHx’s functionality.
                    • 20413
                    • 2,877 Posts
                    Yes! When testing I preview a unpublished doc (logged in as a manager user)

                    <h3>myTV01</h3>
                    <p>[*myTV01*]</p>
                    <h3>myTV02</h3>
                    <p>[*myTV02*]</p>
                    <h3>myTV03</h3>
                    <p>[*myTV03*]</p>
                    <h3>Test1</h3>
                    <p>[+phx:if=`[*myTV01*]`:ne=``:then=`<img src="[*myTV01*]" width="[*myTV02*]" />`:else=``+]</p>
                    <h3>Test2</h3>
                    <p>[*myTV01:ne=``:then=`<img src="[*myTV01*]" width="[*myTV02*]" />`:else=``*]</p>

                      @hawproductions | http://mrhaw.com/

                      Infograph: MODX Advanced Install in 7 steps:
                      http://forums.modx.com/thread/96954/infograph-modx-advanced-install-in-7-steps

                      Recap: Portland, OR (PDX) MODX CMS Meetup, Oct 6, 2015. US Bancorp Tower
                      http://mrhaw.com/modx_portland_oregon_pdx_modx_cms_meetup_oct_2015_us_bancorp_tower
                      • 2661
                      • 53 Posts
                      Thank you as always! I will test this out. Hopefully we are all good and I can move on.