We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36805
    • 354 Posts
    Say I have a doctree as follows:

    MODX doctree root
    |
    -- Projects
    |- Gallery A
    |- Gallery B
    |- Gallery C

    I would like "Projects" to be a page with 3 simple hyperlinks (linked by text not thumbs) to Gallery A,B and C.

    If one of these links is clicked then i want the gallery to open the slidebox without leaving the "Projects" page.

    Any ideas on how to achieve this effect? Thanks in advance.


    Note1:
    It is okay if the gallery management requires to manually go to that page by entering it in the adres bar and that every gallery has its own manage button and form.

    Note 2:
    Probably nothing new for MG experts but I discovered links like this can open a slidebox gallery:
    <a href="/MYPATH/assets/galleries/GALLERYID/FIRSTIMAGE.EXT" rel="lightbox_assets/galleries/GALLERYID/gallery">
    Open gallery
    </a>
    

    Note that the words with caps are variable depending on the image and the gallery itself. One problem with this kind of linking is that it require the filename of the first (or any other) image in the gallery. Could I have MaxiGallery fetch/return this?
      • 36624
      • 535 Posts
      try doing a ditto call in project page and in the ditto chunk put the two maxi call as in this chapter of the wiki (ps: dont forget the rule - first snippet call with [!!] and the second with [[]]..)
        CTRL+SHIFT+U - Clear Cache
        CTRL+SHIFT+H - Hiding Heft Panel
        CTRL+SHIFT+N - Fast Create Resource
        CTRL+ALT+P - Preview Recource (in edit resorce window)
        CTRL+ALT+S - Save
        • 7923
        • 4,213 Posts
        Yes, that should work.. List the documents with Ditto and do it like it’s described in the wiki article (have the MaxiGallery calls in Ditto template chunk ofcourse). Add &view_gallery=`[+id+]` to the calls, so it get’s the pictures from the document that Ditto is listing..


          "He can have a lollipop any time he wants to. That's what it means to be a programmer."
          • 36805
          • 354 Posts
          Thank you for your replies. I have got something working by now though. Your posts were inspiring even if I have done things slightly different in the end.

          I have however one final issue : If i click the link to the gallery it opens the last image for example 7/7 instead of 1/7 and i need to click previous to see the rest. Is there a way to have MaxiGallery start at the beginning? I suppose for the more regular case it is more convenient to start at the last but i use limit=`1` to get only one thumb and then to have MG make a link instead of a thumb i use this in my pictureTpl:
          	<a href="[+maxigallery.picture_link_url+]">
          
          `+]
          	
          	 	[+maxigallery.config.linktext+]
          	
          	</a>
          

          Note: As a workaround to the problem of only getting the pagetitle of the page which is calling my "external" gallery I have hacked MG to fetch the pagetitle of the gallery into the placeholder [+maxigallery.config.linktext+]
            • 7923
            • 4,213 Posts
            Use <a href="[~[+maxigallery.picture.gal_id+]~]"> as the link

            EDIT: Oh, didn’t remember that you use slimbox.. Then it’s the matter of how the picture tags are in the html source, slimbox get’s them into array from the first one to the last.. so you need to make sure that the thumbnail picture tag is above the hidden picture tags..


              "He can have a lollipop any time he wants to. That's what it means to be a programmer."
              • 36624
              • 535 Posts
              hey, i think it’s possible to get the pagetitle without hacking MG using the childgallery template.
              my ditto chunk look like:
              [[MaxiGallery? &gal_query_ids=`[+id+]` &display=`embedded` &embedtype=`slimbox` &order_by=`pos` &limit=`99999` &galleryPictureTpl=`mgGalPicTplHidden` &disable_js_libs=`1` ]]
              [[MaxiGallery?  &display=`embedded` &embedtype=`slimbox` &order_by=`pos` &limit=`1` &childgalleries_ids=`[+id+]` &display=`childgalleries` &childgalleryTpl=`mgGalPicTpl` &disable_js_libs=`1`]]


              and then my "mgGalPicTpl" chunk is like that:
              <a href="[(base_url)][+maxigallery.path_to_gal+][+maxigallery.picture.filename+]" rel="lightbox[set[+maxigallery.picture.gal_id+]]" title="">
              [+maxigallery.pageinfo.pagetitle+]
              </a>




                CTRL+SHIFT+U - Clear Cache
                CTRL+SHIFT+H - Hiding Heft Panel
                CTRL+SHIFT+N - Fast Create Resource
                CTRL+ALT+P - Preview Recource (in edit resorce window)
                CTRL+ALT+S - Save
                • 36805
                • 354 Posts
                You are probably right. Dumb me for simply trying [*pagetitle*]. Thank you for the tip.
                  • 36805
                  • 354 Posts
                  Quote from: MrDutchy at Oct 08, 2007, 03:35 AM

                  I have however one final issue : If i click the link to the gallery it opens the last image for example 7/7 instead of 1/7 and i need to click previous to see the rest. Is there a way to have MaxiGallery start at the beginning?
                  I found a solution, for the record adding this did the trick: &pictureview_start_pos=`1` &order_direction=`ASC`
                    • 4749
                    • 623 Posts
                    Dutchy (or anyone else that can help of course),
                    Would you be willing to post your solution? I’m trying to do something very similar. In fact, it may be identical to what you’ve done. I have a main portfolio page where there are four categories (Commercial, Residential, Civic/Public, Development). There will be links to each of the galleries. When the user clicks on the Commericial links it will take them to the Commercial gallery. Once on the Commercial page there will be a list of projects that the user can click on to see a small gallery and brief description of the project. Here’s an image to refer to:

                    You can see on the right the gallery and description that I want to appear, but on the left SHOULD be a list of links to activate the gallery on the right. I’m trying to create a way for the client to create new projects and for each new project it will create a new link automatically. There must be a way through Ditto and MaxiGallery to accomplish this. Also, as a side note, I wish for these galleries to load without reloading the page, maybe with ajax or something. But, primarily I’m just trying to get it all to work. Any help would be great! Thank you.


                      The MODx has you...
                      Utah Web Design
                      • 7923
                      • 4,213 Posts
                      What’s the problem in doing a list of the galleries? You can simply use Wayfinder to list the documents in some certain folder that are your gallery documents..


                        "He can have a lollipop any time he wants to. That's what it means to be a programmer."