We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28513
    • 53 Posts
    I was not sure how to word the title of this post. I am now trying to re-create the portfolio part of my website with modx and I am very close except for one issue.

    Currently I show a thumbnail that has a title, a little info, ect. When you click on the thumbnail you get the full image in a "lightbox" fancybox to be exact. I have this working great with the following chunk. (Each portfolio piece is a page)

    <div class="thumb">
        <h2> 
            <a href="[+workFull+]" class="workLink" title="[+longtitle+]" rel="[+pagetitle+]"><img src="[+workThumb+]" alt="[+pagetitle+]" /></a>
            <div class="overlay">[+introtext+]</div>
        </h2>
        <h3>
            <a href="" target="_blank">[+pagetitle+]</a>
        </h3>
        <a href="[+workFull2+]" class="workLink" title="[+longtitle+]" rel="[+pagetitle+]"></a>
    </div> <!-- thumb -->


    Now my question is about the second to last line of code in that chunk:

    <a href="[+workFull2+]" class="workLink" title="[+longtitle+]" rel="[+pagetitle+]"></a>


    On my current site that is a hidden link to another full size image When you click the thumbnail and bring up the first image you click the next arrow to see this image.

    Now I can create workFull - workFull6 or something and that will be fine if I enter no more than 6 images. But is there a better way to do this where I can upload one image and then tell the system I would like add another image?

    see www.stevemullencreative.com/work.php for reference.

    Thanks in advance for the replies. This community is great and I am loving modx. I just discovered the managermanger plugin and that is an awesome tool for cleaning up the manager!

    -Steve
      • 4172
      • 5,888 Posts
      I think maxigallery may be right for this task:

      http://modxcms.com/extras/package/259
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 28513
        • 53 Posts
        I had seen people talking about that, but I figured it was just specific looking gallery and not something I could use to exactly mimic what I already have. I will take a look and see what I come up with.

        The current CMS we use at my company has a button that says "I would like to add another image" That is ultimately what I am after.
          • 28513
          • 53 Posts
          Well I was just going to go with having 4 image upload boxes because I never have more than 4 images.

          That did not work as well as I had planned because for that to work my new code has to look like this.

          <div class="thumb">
              <h2> 
                  <a href="[+workFull+]" class="workLink" title="[+longtitle+]" rel="[+pagetitle+]"><img src="[+workThumb+]" alt="[+pagetitle+]" /></a>
                  <div class="overlay">[+introtext+]</div>
              </h2>
              <h3>
                  <a href="" target="_blank">[+pagetitle+]</a>
              </h3>
              <a href="[+workFull2+]" class="workLink" title="[+longtitle+]" rel="[+pagetitle+]"></a>
              <a href="[+workFull3+]" class="workLink" title="[+longtitle+]" rel="[+pagetitle+]"></a>
              <a href="[+workFull4+]" class="workLink" title="[+longtitle+]" rel="[+pagetitle+]"></a>
          </div> <!-- thumb -->


          Now if all 4 images do not have a value it still has the empty links and then returns a blank image that causes it to go hay-wire.

          So I am back to the drawing board on this. I saw some examples of MaxiGallery but that is not really what I am after unless it can really be customized to obtain this same look and functionality. I tried installing it just to play around and couldn’t get anything going based off of their install instructions.

          I hope someone has done something similar to this before. This is the last thing keeping me from re-launching my website modxified smiley
            • 26931
            • 2,314 Posts
            Hi Steve,

            Now if all 4 images do not have a value it still has the empty links and then returns a blank image that causes it to go hay-wire.
            you can use the PHX plugin to hide content if a TV is left empty...like this example: http://modxrules.com/articles/hide-empty-sections-with-phx

            I saw some examples of MaxiGallery but that is not really what I am after unless it can really be customized to obtain this same look and functionality
            MaxiGallery will let you customize it’s output to your needs

            ...and maybe also have a look at DirectResize:
            http://modxcms.com/forums/index.php/topic,19236.0.html

            hope i could hep, j
              • 28513
              • 53 Posts
              Thank you very much for the PHX plugin link! I will use that for now.

              I would like to get familiar with MaxiGallery for use in future projects, but for now this will get me going.

              Thanks so much.
                • 28513
                • 53 Posts
                Ok, trying the PHx plugin and coming up empty handed so far. This is what I have.

                <div class="thumb">
                    <h2> 
                        <a href="[+workFull+]" class="workLink" title="[+longtitle+]" rel="[+pagetitle+]"><img src="[+workThumb+]" alt="[+pagetitle+]" /></a>
                        <div class="overlay">[+introtext+]</div>
                    </h2>
                    <h3>
                        <a href="" target="_blank">[+pagetitle+]</a>
                    </h3>
                    [+phx:if=`[+workFull2+]:is=``:then=`` :else` <a href="[+workFull2+]" class="workLink" title="[+longtitle+]" rel="[+pagetitle+]"></a>`+]
                    [+phx:if=`[+workFull3+]:is=``:then=`` :else` <a href="[+workFull3+]" class="workLink" title="[+longtitle+]" rel="[+pagetitle+]"></a>`+]
                </div> <! -- thumb -->


                It is just hiding them both. There is something in workFull2 but nothing in workFull3. What am I missing?

                Thanks
                  • 26931
                  • 2,314 Posts
                  try:
                  [+phx:if=`[+workFull2+]`:is=``:then=`` :else` <a href="[+workFull2+]" class="workLink" title="[+longtitle+]" rel="[+pagetitle+]"></a>`+]


                  one ` missing after [+workFull2+]
                    • 28513
                    • 53 Posts
                    Still not working. This code out puts :else’ onto the page
                    <div class="thumb">
                        <h2> 
                            <a href="[+workFull+]" class="workLink" title="[+longtitle+]" rel="[+pagetitle+]"><img src="[+workThumb+]" alt="[+pagetitle+]" /></a>
                            <div class="overlay">[+introtext+]</div>
                        </h2>
                        <h3>
                            <a href="" target="_blank">[+pagetitle+]</a>
                        </h3>
                        [+phx:if=`[+workFull2+]`:is=``:then=`` :else` <a href="[+workFull2+]" class="workLink" title="[+longtitle+]" rel="[+pagetitle+]"></a>`+]
                        [+phx:if=`[+workFull3+]`:is=``:then=`` :else` <a href="[+workFull3+]" class="workLink" title="[+longtitle+]" rel="[+pagetitle+]"></a>`+]
                    </div> <! -- thumb -->


                    This code goes back to hiding them both:
                    <div class="thumb">
                        <h2> 
                            <a href="[+workFull+]" class="workLink" title="[+longtitle+]" rel="[+pagetitle+]"><img src="[+workThumb+]" alt="[+pagetitle+]" /></a>
                            <div class="overlay">[+introtext+]</div>
                        </h2>
                        <h3>
                            <a href="" target="_blank">[+pagetitle+]</a>
                        </h3>
                        [+phx:if=`[+workFull2+]:is=``:then=`` :else` <a href="[+workFull2+]" class="workLink" title="[+longtitle+]" rel="[+pagetitle+]"></a>`
                        if=`[+workFull3+]:is=``:then=`` :else` <a href="[+workFull3+]" class="workLink" title="[+longtitle+]" rel="[+pagetitle+]"></a>`+]
                    </div> <! -- thumb -->
                      • 26931
                      • 2,314 Posts
                      :else’
                      are you using ’ (single quotation mark) or backticks ` ? ... should be backticks