We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4749
    • 623 Posts
    I’m using MooTabs for a page that I want four galleries on. But every time I reference the galleries, they don’t show up. I’m using Ditto to pull the information from an unpublished directory that contains the four galleries. But for some reason it won’t render. I think it may have something to do with the MooTabs code, but not sure.

    I’ve created multiple galleries before and they worked great, but this time it’s not working. Why would creating a tabbed browsing experience destroy the multiple galleries. Here’s what I’m trying to do:

    <div id="r_col">
    				
    					<h1>Landscape Design Services</h1>
    					
    				  	<div id="myTabs" class="mootabs">
    						<ul class="mootabs_title">
    							<li title="Commercial">Commercial</li>
    							<li title="Residential">Residential</li>
    							<li title="CivicPublic">Civic & Public</li>
    							<li title="Development">Development</li>
    						</ul>
    						
    						<div id="Commercial" class="mootabs_panel">
    							<h3>Commercial Services</h3>
    							<div class="tab_info">
    								<div class="l_side">
    									<p>Donec egestas ullamcorper dui. Donec nec orci. </p>
    									<ul class="square">
    										<li>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</li>
    										<li>Donec at urna sed sem pharetra facilisis.</li>
    										<li>Integer malesuada urna sed erat.</li>
    										<li>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</li>
    										<li>Donec at urna sed sem pharetra facilisis.</li>
    									</ul>
    									
    								</div>
    								
    								<div class="r_side">
    									<div class="pics">
    										[[MaxiGallery? &display=`embedded` &embedtype=`slimbox`&max_pic_number=`4` &max_thumb_size=`150x100` ]]
    									</div>
    									<p>*Click <a href="#">Here</a> to see our complete gallery.</p>
    								</div>
    								
    							</div><!-- End Tab Info -->
    							
    							<div class="clearer"></div>
    							
    						</div><!-- End Commerical Panel -->
    						
    						<div id="Residential" class="mootabs_panel">
    							<h3>Residential Services</h3>
    							<div class="tab_info">
    								<div class="l_side">
    									<p>Donec egestas ullamcorper dui. </p>
    									<ul class="square">
    										<li>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</li>
    										<li>Donec at urna sed sem pharetra facilisis.</li>
    										<li>Integer malesuada urna sed erat.</li>
    										<li>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</li>
    										<li>Donec at urna sed sem pharetra facilisis.</li>
    									</ul>
    									
    								</div>
    								
    								<div class="r_side">
    									<div class="pics">
    										[[MaxiGallery? &display=`embedded` &embedtype=`slimbox`&max_pic_number=`4` &max_thumb_size=`150x100` ]]
    									</div>
    									<p>*Click <a href="#">Here</a> to see our complete gallery.</p>
    								</div>
    								
    							</div><!-- End Tab Info -->
    							
    							<div class="clearer"></div>
    							
    						</div>
    						<div AND SO ON..........>
    


    Sorry about all the code, but I need to be specific. Oh, BTW, (0.9.6, MG 0.5.2). Each <div> is a tab that the MooTabs code hide/shows whenever clicked. But, the Galleries won’t show up. Please help! Has anyone ever done something like this? Thanks.
      The MODx has you...
      Utah Web Design
      • 10449
      • 956 Posts
      It’s been a while since I last used MG, but here’s a few tips/questions:

      What happens when you publish the directory?

      Try adding a unique id to your MG params: &id=`123` etc.

      Try calling the snippets [!uncached!]

      Always recommendable while developing: add &debug=`1`
      makes it easier to find bugs...

        • 4749
        • 623 Posts
        Good suggestions. I actually do have dual MG calls because there are multiple galleries on the page - one cached the other uncached. So, I don’t think that’s the problem, but I will add the debug and see what I can find and post the results.
          The MODx has you...
          Utah Web Design
          • 7923
          • 4,213 Posts
          Where do you define that from what document the galleries are retrieved? In your example code above, I see just 2 exactly same calls what do not use any parameters that would make the snippet to retrieve the pictures from another document. That would mean that there will be two "manage pictures" buttons on the document that both handle and show the same pictures.. and the pictures are bound to that document..


            "He can have a lollipop any time he wants to. That's what it means to be a programmer."
            • 4749
            • 623 Posts
            doze,
            Sorry about that. I do have the &view_gallery=`1` parameter in there, but now my tabs are not showing up properly. I think I must solve that problem first. However, if you have any insight that would be great. I’ve done multiple galleries before, but this time it’s just not working. I’ve got a MG call on the gallery page itself, then I have another call with the ditto call that specifies the gallery and it’s not working. So, I guess I’ll get back to you when I’ve got my tabs working again.
              The MODx has you...
              Utah Web Design
              • 4749
              • 623 Posts
              OK, I have the tabs working again. But now I realize how inept I am. I should be able to do just about anything I want style-wise, but I can’t figure out how to do what I want. Basically, for this site the client has a services page where they want just four images of their work that people can click and see, but also with a link to the full gallery of images. All this needs to be able to be managed by the client with MaxiGallery.

              I was thinking of using Slimbox on the services pages where there are only four images, then on the actual galleries pages I wanted to use another pure css gallery where the thumbnails are on the same page as the big images with a title and description that changes with each picture. Is this possible with MaxiGallery? If so, what steps should I be taking? I appreciate all the suggestions and help so far, please, keep them coming.
                The MODx has you...
                Utah Web Design
                • 7923
                • 4,213 Posts
                First you have to create the separate galleries in some documents. It doesn’t matter what layout you use in these documents. If you want it to be "pure css" layout where thumbnails and bigger images are on the same page, so be it. You can follow this guide to set it up.

                Then when you want to display the galleries on another document, you can do the following:

                Do a Ditto call that lists the gallery documents, then in Ditto’s template use a call:

                [!MaxiGallery? &view_gallery=`[+id+]` &display=`embedded` &embedtype=`slimbox`!]

                The [+id+] is a Ditto placeholder what retrieves the currently rendered document id.


                  "He can have a lollipop any time he wants to. That's what it means to be a programmer."
                  • 4749
                  • 623 Posts
                  Doze,
                  Thanks for the response, MaxiGallery is great I just need to understand it better. I believe I have tried just about everything. I placed the MG call in the Ditto template on my first try, but it didn’t work. I then tried a couple other things, but no luck. Now, the MG call is showing up in the rendered page. Don’t I have to have two maxigallery calls because I’m using Ditto? Here’s my basic set up:

                  I have a container with the galleries:

                  - Container
                    - Gallery 1
                    - Gallery 2
                    - Gallery 3
                    - Gallery 4

                  Then I have a the main menu item:

                  - Home
                  - SERVICES
                  - Gallery
                  - About
                  - Contact

                  In the services page I have a Javascript Tabbed menu:

                  Commercial - Residential - Civic Public - Development

                  In the content area of each of these tabbed menus (each tab has it’s own div that is all on the same page of code) is some text and a small gallery of 4 pictures that I’m calling with Ditto. So, the Commercial tab is pulling the info and gallery from Gallery 1 in the Gallery container. Now it’s my understanding that there has to be TWO ditto calls - one in the original document itself (gallery 1) and one where I want the gallery to appear with the other three galleries (Ditto call and MG call). I don’t know what else to try, but I am willing to try anything at this point. Thanks again Doze.

                    The MODx has you...
                    Utah Web Design
                    • 7923
                    • 4,213 Posts
                    No.. The Gallery 1..n documents need to have a maxigallery call, for example [!MaxiGallery!]

                    Then in the Services document, you can use Ditto to list the documents under the "Container" folder, eg. the gallery documents. And in the Ditto template, you have a maxigallery call that uses &view_gallery parameter to get the gallery from each gallery document that Ditto lists.

                    Or you can do them manually, eg. put [!MaxiGallery? &view_gallery=`12`!] ... [!MaxiGallery? &view_gallery=`13`!] ... etc. calls to the individual "tabs" accordingly. You might want to add &manage_target parameter to the calls to make the picture management on a different page. The picture managing won’t work otherwise when there are multiple calls on a page.

                    If you just see the snippet call as text on your page, it’s because of the combination of page caching, PHx and chunks. This is a known problem and the resolution (if i remember correctly) is to call snippets cached and change the page to be uncached.. or then it was the other way around..


                      "He can have a lollipop any time he wants to. That's what it means to be a programmer."
                      • 4749
                      • 623 Posts
                      Doze,
                      It’s just one thing after another. I’m so sorry for being so dense. I think it may be working the way I hoped, at least it seems so, but not I get a 403 Permission Denied Error. When I’m on the tabbed pages and I click manage pictures it takes me to the original gallery page (via, &manage_target), but when I go to upload pictures or view the pics already in the gallery I get the 403 error. Any ideas on that? I’ll keep looking for an answer in the mean time. Thanks again for all your help, you’ve been great.

                      Here’s the error when I upload, it’s a 403 when I try to view the images:
                      « MODx Parse Error »
                      MODx encountered the following error while attempting to parse the requested resource:
                      « PHP Parse Error »

                      PHP error debug
                        Error: chmod() [function.chmod]: No such file or directory
                        Error type/ Nr.: Warning - 2
                        File: /home/public_html/in-sitedesigngroup.com/assets/snippets/maxigallery/maxigallery.php
                        Line: 372
                        Line 372 source: chmod($mg->path_to_gal.$name,0666);

                      Parser timing
                        MySQL: 0.0069 s (5 Requests)
                        PHP: 0.1228 s
                        Total: 0.1297 s

                      EDIT:
                      MaxiGallery will upload the pics, create the thumbnails even though it’s throwing that error. I just refresh the gallery and the images are there, but now when I fill in text for the Title and Description they won’t save. When I click ’save changes’ it just erases the Title and Description. Hmm? No clue here.
                        The MODx has you...
                        Utah Web Design