We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 31640
    • 100 Posts
    I had some problems with maxigallery. I succeeded in getting this working

    I have in my site 1 page with a thumbnail on it for every gallery
    this is the url: http://www.yannickmx.be/index.php?id=5
    This page is a folder
    and i have in this folder 1 document for every gallery

    It works great
    but it is too difficult for my customer !!!!

    I Explain:

    There is a folder with the following code:
    [!MaxiGallery?  &gal_query_ids=`22` &display=`embedded` &embedtype=`slimbox` &order_by=`pos` &limit=`1` 
    &max_thumb_size=`250` &quality_pic=`100` &quality_thumb=`100` &galleryPictureTpl=`mgGalPicTpl`!] 
    [!MaxiGallery?  &gal_query_ids=`21` &display=`embedded` &embedtype=`slimbox` &order_by=`pos` &limit=`1` 
    &max_thumb_size=`250` &quality_pic=`100` &quality_thumb=`100` &galleryPictureTpl=`mgGalPicTpl`!] 
    [!MaxiGallery?  &gal_query_ids=`22,21` &display=`embedded` &embedtype=`slimbox` &order_by=`pos` &limit=`99999` 
    &galleryPictureTpl=`mgGalPicTplHidden` &manageOuterTpl=`CODE:` &manageButtonTpl=`CODE:`!] 
    


    Then on every document in that folder there is the following code to put one gallery on the document
    [!MaxiGallery? &display=`embedded` &embedtype=`slimbox` &order_by=`pos` &limit=`1` 
    &max_thumb_size=`300` &quality_pic=`100` &quality_thumb=`100` &galleryPictureTpl=`mgGalPicTpl`!]
     [!MaxiGallery? &display=`embedded` &embedtype=`slimbox` &order_by=`pos` &limit=`99999`
     &galleryPictureTpl=`mgGalPicTplHidden` &manageOuterTpl=`CODE:` &manageButtonTpl=`CODE:`!]
    


    With this code there is a thumbnail with a slimbow for every document in the folder...

    When my customer needs to create a new document (gallery) she has to do 2 things that are too complicated:

    First off all she has to put the specific code on the new document...
    But that piece of code is always the same, is there a way to automatically insert the code in the documents created in the specific folder for the galleries.

    And the second item is allready mentioned, that is the fact that she has to modify the folder code: there she has to add, for XX (the newly created documented id):
    [!MaxiGallery? &gal_query_ids=`XX` &display=`embedded` &embedtype=`slimbox` &order_by=`pos` &limit=`1`
    &max_thumb_size=`250` &quality_pic=`100` &quality_thumb=`100` &galleryPictureTpl=`mgGalPicTpl`!]

    for the new gallery and she has to modify :
    [!MaxiGallery? &gal_query_ids=`22,21,XX` &display=`embedded` &embedtype=`slimbox` &order_by=`pos` &limit=`99999`
    &galleryPictureTpl=`mgGalPicTplHidden` &manageOuterTpl=`CODE:` &manageButtonTpl=`CODE:`!]

    Doze suggested to use TV to automate this proces

    But i don’t really know how i do this

    Hope you can help, because this is the last thing i need to fix to finish my first modx project smiley
      • 31640
      • 100 Posts
      Nobody???

      Or is there a better place in this forum to ask this question
        • 31640
        • 100 Posts
        ....
          • 7231
          • 4,205 Posts
          I’m not sure how to automate the process. But you could use TVs to provide a simple interface for the client to fill in only the info they need to manage and the rest of the code would either be directly in the template or in a chunk and managed via some logic.

          Template Variables are custom input fields. create a text type TV for each parameter they need to alter then place the TV placeholder in the snippet call:

          [!MaxiGallery?  &gal_query_ids=`[*galeryId*]` &display=`embedded` &embedtype=`slimbox` &order_by=`pos` &limit=`1`
          &max_thumb_size=`250` &quality_pic=`100` &quality_thumb=`100` &galleryPictureTpl=`mgGalPicTpl`!]


          To automate it you would need to have some association between the documents that would auto generate the values based on some specific criteria.
            [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

            Something is happening here, but you don't know what it is.
            Do you, Mr. Jones? - [bob dylan]