We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22446
    • 181 Posts
    I have a gallery listed on resource 153 and the parent resource is 132. The problem I am having is when I click on the thumbnails the URL listed isn’t correct.

    For example:

    My site is http://www.example.com
    Resource 132 ->test.html
    Resource 153 ->page1.html

    When visiting resource 132
    URL - http://www.example.com/test.html

    When visiting resource 153
    URL = http://www.example.com/test/page1.html

    When I try and click on an thumbnail image in the gallery posted on resource 153
    URL = http://www.example.com/test/test/page1.html?galItem=23&galAlbum=7&galTag=

    Notice that there is two test in the URL. Does anyone know how to correct this?

    The URL should be
    http://www.example.com/test/page1.html?galItem=23&galAlbum=7&galTag=
      • 22446
      • 181 Posts
      I have been looking around on the gallery install. If I look at galItemThumb chunk and it shows:

      <a href="[[+linkToImage:if=`[[+linkToImage]]`:is=`1`:then=`[[+image_absolute]]`:else=`[[~[[*id]]?&[[+imageGetParam]]=`[[+id]]`&[[+albumRequestVar]]=`[[+album]]`&[[+tagRequestVar]]=`[[+tag]]` ]]`]]">


      I still get my page to show up:
      URL = http://www.example.com/test/test/page1.html?galItem=23&galAlbum=7&galTag=

      I think the problem is in [[*id]]. Is there any suggestions on a different approach?
        • 9207 ☆ A M B ☆
        • 2,475 Posts
        What version of MODx are you using? And which Snippet is this?
          • 22446
          • 181 Posts
          Sorry, I am using the recent version of modx revolution 2.0.4.

          The callout is the chunk located in the gallery category called galItemThumb.

          I use the gallery callout on my resource page.

          [[!Gallery? &album=`Fishing Equipment` &tag=`Pier Tender` ]][[!GalleryItem]]
            • 26903
            • 1,336 Posts
            Hi guys, I’ve been caught by this also, do we have a fix at all yet?
              Use MODx, or the cat gets it!
              • 22446
              • 181 Posts
              I didn’t find a way to correct the image URL issue, but I did find a work around. Download fancybox and upload the files to your site. For me I uploaded the files into a folder called fancybox.

              Using Fancybox I am able to display the images.
              http://fancybox.net/

              Follow the instructions for fancybox on their how to use page.
              http://fancybox.net/howto

              Place in head of your template
              <link rel="stylesheet" type="text/css" href="/fancybox/jquery.fancybox-1.3.1.css" media="screen" />
              <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js"></script>
              <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js"></script> 
              <script type="text/javascript" src="/fancybox/jquery.easing-1.3.pack.js"></script>
              <script type="text/javascript" src="/fancybox/jquery.mousewheel-3.0.2.pack.js"></script>
              <script type="text/javascript" src="/fancybox/jquery.fancybox-1.3.1.js"></script>
              <script type="text/javascript">
              $(document).ready(function() {
                $("a[rel=image_group]").fancybox({
                   'transitionIn'		: 'none',
                   'transitionOut'		: 'none',
                   'titlePosition' 	: 'over',
                   'titleFormat'       : function(title, currentArray, currentIndex, currentOpts) {return '<span id="fancybox-title-over">Image ' +  (currentIndex + 1) + ' / ' + currentArray.length + ' ' + title + '</span>';}
              	});
              
              });
              </script>
              

              On my Resource Page
              <div style="text-align:center; font-weight:bold;">Image gallery <small>(Click on image to enlarge) </small></div>
              <div style="overflow:hidden;">
              [[!Gallery? &album=`Fishing Equipment` &tag=`Pier Tender` &thumbTpl=`fancyboxThumb`]]
              [[!GalleryItem]]
              </div>


              fancyboxThumb Chunk
              <div class="[[+cls]]">
                <a rel="image_group" title="[[+name]]" href="[[+image]]">
                      <img class="[[+imgCls]]" src="[[+thumbnail]]" alt="[[+name]]" />
                  </a>
              </div>​
              


              With fancybox installed on my server and the chunk and resource shown above I am able to use gallery and fancybox to display the images. This isn’t a solution to the URL problem for images not working just a work around. After figuring out this solution I actually like the interface displayed.
                • 38624
                • 2 Posts
                Hello, I had the same problem. I managed to fix it with some hints in this thread.

                - Go to the Gallery snippet
                - Go to it's properties
                - Unlock the default properties
                - Set linkToImage to 'Yes'
                - Lock properties and save