We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 25876
    • 79 Posts
    hey folks,

    so, what I need is one single textlink like "klick" to open up the whole gallery behind.
    what I managed so far is to get a textlink instead of the thumbs by changing the galleryPictureTpl=`customedTpl`.
    Works fine, i get my text, but I get it as often as many pictures are in the gallery
    And no matter what, I want it always only one single time, clicking it you get the first picture of the gallery but also you are able to switch to all the other ones in the gallery.

    Is that possible? F.e. with &limit=`1` I get only one link, but i can’t switch to the other pics.
    I’ll post my new gallerypicturetpl:
    [+maxigallery.embedtype:is=`smoothgallery`:then=` 
    	<div class="imageElement">
    	<h3>[+maxigallery.picture.title:htmlent+]</h3>
    	<p>[+maxigallery.picture.descr:htmlent+]</p>
    	<a href="[+maxigallery.picture_link_url+]" title="[+maxigallery.strings.click_to_zoom+]" class="open"></a>
    	<img src="[(base_url)][+maxigallery.path_to_gal+][+maxigallery.picture.filename+]" class="full" />
    	<img src="[(base_url)][+maxigallery.path_to_gal+]tn_[+maxigallery.picture.filename+]" class="thumbnail" />
    	</div>
    `+]
    
    [+maxigallery.embedtype:isnot=`smoothgallery`:then=`
     
    
    [+maxigallery.embedtype:is=`slidebox`:then=` 
    
    	<a href="[(base_url)][+maxigallery.path_to_gal+][+maxigallery.picture.filename+]" rel="lightbox_[+maxigallery.path_to_gal+]gallery">
    
    `+]
    
    [+maxigallery.embedtype:is=`lightboxv2`:then=` 
    
    	<a href="[(base_url)][+maxigallery.path_to_gal+][+maxigallery.picture.filename+]" rel="lightbox[maxigallery]" title="[+maxigallery.picture.title:htmlent+] - [+maxigallery.picture.descr:htmlent+]">
    
    `+]
    
    [+maxigallery.embedtype:is=`slimbox`:then=` 
    
    	<a href="[(base_url)][+maxigallery.path_to_gal+][+maxigallery.picture.filename+]" rel="lightbox[maxigallery]" title="[+maxigallery.picture.title:htmlent+] - [+maxigallery.picture.descr:htmlent+]">
    
    `+]
    
    [+maxigallery.embedtype:is=`popup`:then=` 
    
    	<a href="javascript:void(0);" onClick="javascript:openWindow('[(base_url)][+maxigallery.path_to_gal+][+maxigallery.picture.filename+]','[+maxigallery.picture.title:htmlent+]',[+maxigallery.picture_height_normal+],[+maxigallery.picture_width_normal+],'gallery');">
    
    `+]
    
    [+maxigallery.embedtype:is=`external`:then=` 
    
    	<a href="[(base_url)][+maxigallery.path_to_gal+][+maxigallery.picture.filename+]" rel="external">
    
    `+]
    
    [+maxigallery.embedtype:is=``:then=`
    	
    	<a href="[+maxigallery.picture_link_url+]">
    
    `+]
    
    	 	[klick]
    	</a>
    	[+maxigallery.picture.title:isnot=``:then=`
    
    <!-- beschreibung unter bild
    		<p class="klein">
    		[+maxigallery.picture.title:htmlent+]
    		</p>
    -->
    	`+]
    
    `+]


    Hope this helps,
    Thanks a lot, Simon

      • 7923
      • 4,213 Posts
      Follow this guide, but remove the picture tag from the example maxigallery template and just put that "click" text in there..


        "He can have a lollipop any time he wants to. That's what it means to be a programmer."
        • 25876
        • 79 Posts
        okey, thanks man, should have known that.

        works fine now, but what’s still troubling me is a folder problem.
        I got a folder containing three documents and the folder shows a overview via ditto.
        Now, i need a gallery on each document seperately!

        If I create the three galleries in the three different documents, they all turn out to be the same big gallery!
        Looking at the FTP, I see that MaxiGallery created (as suspected) one gallery with the folder’s ID.

        Why is that or how can I tell MG to create 3 galleries with the IDs of the concerned docs?

        Thanks for any help again,
        Simon
          • 7923
          • 4,213 Posts
          Hmm.. it seems that you have setuped it somehow wrong.. if i understood correctly..

          So you have three documents in a folder and in the folder page, you want to list all the three galleries via ditto?

          So in Ditto’s template, you will use &view_gallery=`[+id+]` in the maxigallery calls and also use &manage_target parameter to do the picture management on a separate document. See the usage of &manage_target from modx wiki and also check this topic.


            "He can have a lollipop any time he wants to. That's what it means to be a programmer."
            • 25876
            • 79 Posts
            doze, you did it again.

            thanks a lot, the &view_gallery=`[+id+]` did it.
            used the manage_target already, now it works how it should!

            great!