We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 27889
    • 415 Posts
    In Maxigallery 0.5.2 I’m trying to use [+maxigallery.config.gal_query_ids+] placeholder in my galleryPictureTpl but nothing is displayed.
    Note that I multiple call the snippet from an other, perhaps is the reason:
    <?php
    $list = $modx->runSnippet('maxigallery',
    			array(
    				'gal_query_ids'=>$row['id'],
    				'galleryPictureTpl'=>'ChildGalleryTplContinent',
    				'limit'=>'1',
    				'lang'=>'fr',
    				'display'=>'embedded',
    				'embedtype'=>'lightboxv2',
    				'css'=>'/css/galeriecss.css'
    				)
    			);
    			echo $list;
    ?>


    here is the chunk template
    <div id ="vignette">
      <div  id="vimage">
      <a href="[(base_url)][+maxigallery.path_to_gal+][+maxigallery.picture.filename+]" rel="lightbox[maxigallery]" title="[+maxigallery.picture.title:htmlent+] - [+maxigallery.picture.descr:htmlent+]">
              <img style="margin-top:[+maxigallery.picture_height_thumb:math=`(180-?)/2`:int +]px;" src="[(base_url)][+maxigallery.path_to_gal+]tn_[+maxigallery.picture.filename+]"  title="[+maxigallery.picture.title:htmlent+] [+maxigallery.strings.click_to_zoom+]" alt="[+maxigallery.picture.title:htmlent+] [+maxigallery.strings.cliquez pour zoomer+]"  />
        </a>
      </div>
       <div id="vtitre" >
           <span>[+maxigallery.pageinfo.pagetitle:htmlent+]-[+maxigallery.config.gal_query_ids+]</span>
      </div>
    </div>
    


    The purpose is to display one image per galerie in the parent of the parent. (The parents haven’t any gallery and are just present to categorize the img.)

    EDIT: The [+maxigallery.pageinfo.field+] parameter display fields from the page where the gallery is displayed, quite useless becausse a [*field*] do the job, it would be better (but harder smiley ) to display field from the gallery’s page.
      MODx Sites & Prestations: http://dp-site.fr [Last MODx Site]
      MODx Repository: [HOME] [MetaTagsExtra] / Current Dev: [xFDM]
      • 7923
      • 4,213 Posts
      hmm.. I’ll do some tests.. there might be bugs with the maxigallery.config.. placeholders, i haven’t used them my self..


        "He can have a lollipop any time he wants to. That's what it means to be a programmer."
        • 27889
        • 415 Posts
        After some tests, others maxigallery.config.parameter are working. I will check deeper.
        Edit: It seems that’s because gal_query_ids is an array. Is there a way to retrieve the value of that array ?

        Solved, I use ’view_gallery’ insteed ’gal_query_ids’, and all the parameters are ok
          MODx Sites & Prestations: http://dp-site.fr [Last MODx Site]
          MODx Repository: [HOME] [MetaTagsExtra] / Current Dev: [xFDM]
          • 7923
          • 4,213 Posts
          Sorry, I haven’t had time to look into this yet.. but yea, the gal_query_ids parameter value is converted into an array by maxigallery.

          I’m not 100% sure, but I think that this might work:

          [+maxigallery.config.gal_query_ids.0+] <-- for the first id
          [+maxigallery.config.gal_query_ids.1+] <-- for the second id
          [+maxigallery.config.gal_query_ids.2+] <-- for the third id... etc.



            "He can have a lollipop any time he wants to. That's what it means to be a programmer."
            • 27889
            • 415 Posts
            No problem and thank you for the info
              MODx Sites & Prestations: http://dp-site.fr [Last MODx Site]
              MODx Repository: [HOME] [MetaTagsExtra] / Current Dev: [xFDM]