We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 34162
    • 1 Posts
    hi!

    how can i create childgalleries?

    i’ve created all the folders and adjusted all paths in the script.
    when i call the snippet like this
    [[ MaxiGallery? &display=`childgalleries` ]]


    it doesn’t work - i get the following error
    « MODx Parse Error »
    MODx encountered the following error while attempting to parse the requested resource:
    « PHP Parse Error »
     
    PHP error debug
      Error: 	Invalid argument supplied for foreach()	 
      Error type/ Nr.: 	Warning - 2	 
      File: 	W:\playground\html\modx\assets\snippets\maxigallery\maxigallery.php	 
      Line: 	615	 
      Line 615 source: 	foreach($children as $child) {


    it works with every other &display-value (embedded,...).

    what can be the problem?
    any tutorials out there which describe how to make childgalleries with maxiygallery?

    ps:
    modxcmd 0.9.5
    maxygallery 0.5 Beta2 Rev 49
      • 7923
      • 4,213 Posts
      You create childgalleries like this:

      Site root
      |
      |-Gallery [!MaxiGallery? &display=`childgalleries`!]
      | |
      | |- Dogs [!MaxiGallery!]
      | |- Cats [!MaxiGallery!]
      | |- People [!MaxiGallery!]
      |

      And when you then go to the Gallery document, it lists all the child galleries (Docs, Cats, People).


        "He can have a lollipop any time he wants to. That's what it means to be a programmer."
        • 8334
        • 17 Posts
        Hello. I need to do this as well and I am unsure of what exactly you mean... I need to place icons on the main gallery page to categorize the work we’ve done. When people click on an icon it takes them to a gallery of work in that category. This is a, I am assuming, childgallery thing but what confuses me is, how do I do what I just mentioned and then how would I specify to which gallery to upload the images?
          • 7923
          • 4,213 Posts
          Quote from: DzynLabJW at Feb 19, 2007, 11:23 AM

          Hello. I need to do this as well and I am unsure of what exactly you mean... I need to place icons on the main gallery page to categorize the work we’ve done. When people click on an icon it takes them to a gallery of work in that category. This is a, I am assuming, childgallery thing but what confuses me is, how do I do what I just mentioned and then how would I specify to which gallery to upload the images?
          The simplest to do that would be to create a image TV for the gallery documents that holds the icon, then use Ditto to list the child documents on the container document and show your icon.


            "He can have a lollipop any time he wants to. That's what it means to be a programmer."
            • 34162
            • 1 Posts
            Quote from: doze at Feb 19, 2007, 11:29 AM

            The simplest to do that would be to create a image TV for the gallery documents that holds the icon, then use Ditto to list the child documents on the container document and show your icon.
            sorry, but i have no clue how to do that.
            creating an image-TV just gives me the ability to insert an image (which doesn’t work - just see a stupid image-path).
            it would make more sense to me, to use maxigallerysolo to show the icon. -
            then use Ditto to list the child documents on the container document and show your icon.
            but i thought that [!MaxiGallery? &display=`childgalleries`!] outputs some random-pics as gallery-folder-icons.

            i do understand the first way (container with child-docs) - but i don’t want to create sub-pages for every gallery - at least not manually.
              • 7923
              • 4,213 Posts
              First, There is two issues discussed in this topic.

              1. How to make childgalleries display (I answered that in my first post to this thread)
              2. How to show childgalleries and a "custom icon" for each child gallery (I answered that in my second post to this thread)

              Second, If you don’t want the create the galleries in child documents to some container, I don’t know why you are asking how to show childgalleries as there would be no childs to show..


                "He can have a lollipop any time he wants to. That's what it means to be a programmer."
                • 34162
                • 1 Posts
                create a image TV for the gallery documents that holds the icon
                don’t understand this

                question) maxigallery with &display`childgalleries` DOES NOT generate custom icons from sub-gals per default, so i have to map a TV-var of type "image"? now i just have to look up, how to fill a TV dynamically...

                ergo, i need to generate the "subgallery-list" with ditto, because i want to show a custom icon.

                as of the information i’ve learned in this topic i would do it liek this:
                1) for every sub-gallery i have to add a sub-document to e.g. the "gallery"-container. insert there [[maxigallery? whateva]]
                2) in the "gallery"-container i generate the sub-gal-list with ditto and a image-TV(how to fetch a thumbnail from maxigallery into a image-TV??) - i don’t/cannot use [[maxigallery? &display=`childgalleries`]] as i want that custom icon

                is that correct? (at least basically)
                  • 7923
                  • 4,213 Posts
                  What do you mean by "custom icon" for the gallery? is the image in the gallery? if it is, then you can use childgalleries display mode. If the "custom icon" is some picture that is not in the gallery you’d need to do a TV to the template that you use in your gallery documents and use Ditto to list the galleries.

                  I didn’t understand this too:
                  Quote from: tcsoft at Feb 19, 2007, 01:06 PM

                  1) for every sub-gallery i have to add a sub-document to e.g. the "gallery"-container. insert there [[maxigallery? whateva]]
                  Why you need to do sub-document to sub-gallery etc? why not just one gallery container document and all galleries as child documents..? or do will you have many different groups?


                    "He can have a lollipop any time he wants to. That's what it means to be a programmer."
                    • 34162
                    • 1 Posts
                    @doze
                    thanks, i’ve tried it out like you said it in your first post!! it works *THUMBS UP*

                    what i have now is

                    site-root
                    |
                    |---Gallery-Index (display childgalleries) (document container)
                    |-Gallery1 (subdocument with [[MaxiGallery?...]])
                    |-Gallery2 ....
                    |-Gallery.....

                    what still confuses me is DzynLabJW’s question
                    i think it hadn’t anything to do with my request laugh
                    (as i think, he wanted to group/filter pictures by e.g. photographer)
                      • 7923
                      • 4,213 Posts
                      Yes, like I tried to tell you previously, they were two different issues. Glad that you got it working!


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