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

    I have a site that has a lot of Galleries, when a user adds a new one and wants to add it to a page through a TV he is presented with a massive list.

    I want to set up 2 TVs, one that chooses galleries-parents (with the parent value=0) and a second one that would choose the Gallery that belongs to the parent selected with the first TV.

    For example:

    GalleryParent1:
    ------------------ 01_GalleryChild1
    ------------------ 01_GalleryChild2
    ------------------ 01_GalleryChild3
    ------------------ 01_GalleryChild4

    GalleryParent2:
    ------------------ 02_GalleryChild1
    ------------------ 02_GalleryChild2
    ------------------ 02_GalleryChild3

    So when a user choose GalleryParent2 from the first TV only the 02_Galleryxx will show up on the second TV list.

    Thank you.
      • 4172
      • 5,888 Posts
      should be possible with the dynamicdropdown-TV
      https://github.com/Bruno17/dddx
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 15392
        • 61 Posts
        I only get 'Input Option Values' and 'Default Value' from the Input Option Tab, for dddx and dynamic_dropdown input types. Is that correct?

        Running 2.2.4-pl.
          • 4172
          • 5,888 Posts
          did you just upload the file dddx-1.0-pl.transport.zip to your packages-directory and installed this package by package-manager?

          Then you should get a lot of new input-fields in inputOptions when you select dynamic_dropdown

          'dddx' shouldn't be in the list. Only 'dynamic_dropdown'
            -------------------------------

            you can buy me a beer, if you like MIGX

            http://webcmsolutions.de/migx.html

            Thanks!
            • 15392
            • 61 Posts
            Thank you for being so helpful.
            Yes I did install with package manager. I will uninstall and install again to see if it fixes anything.
              • 4172
              • 5,888 Posts
              there is now a updated version on github
              https://github.com/Bruno17/dddx

              has new custom-processors for gallery-albums and a bugfix

              you can use it this way:

              Create 2 dynamic_dropdown-TVs:

              name: albums0
              Parent Dropdown:
              dddx Group: gallery_albums

              name: albums1
              Parent Dropdown: albums0
              dddx Group: gallery_albums [ed. note: Bruno17 last edited this post 14 years ago.]
                -------------------------------

                you can buy me a beer, if you like MIGX

                http://webcmsolutions.de/migx.html

                Thanks!
                • 15392
                • 61 Posts
                Thanks,

                So now it's displaying the rest of the fields.
                But how do I change it so that the first TV displays all the parent galleries, on a list select TV I put @SELECT `id`, `name` FROM `[[+PREFIX]]gallery_albums` WHERE `parent` = 0 on the input option values. Tried that with dddx and it's displaying resources instead.

                  • 4172
                  • 5,888 Posts
                  you don't need any input-options

                  this is all done by this new processors, I've added to github
                  just create both TVs as described above.
                    -------------------------------

                    you can buy me a beer, if you like MIGX

                    http://webcmsolutions.de/migx.html

                    Thanks!
                    • 15392
                    • 61 Posts
                    Installed package dddx-1.0.1-pl.transport.zip.
                    Created the following TV:
                    name: album0
                    Parent Dropdown:
                    dddx Group: gallery_albums

                    name: album1
                    Parent Dropdown: album0
                    dddx Group: gallery_albums

                    I have getoptions.albums0.php and getoptions.albums1.php under my processors/mgr/gallery_albums directory, but still no luck...

                    Any sugestions?
                      • 4172
                      • 5,888 Posts
                      what do you get now in your dropdown-lists?

                      you should get ths albums with parent = 0 in the first one
                      and the child-albums of the selected one of the first one in the second one.

                      you have installed version 1.0.1 or added this patch to core/components/dddx/elements/tv/input/dynamic_dropdown.class.php?

                      https://github.com/Bruno17/dddx/commit/9648ef510396e653a54f2a80cde08aa61dd7d288
                      [ed. note: Bruno17 last edited this post 14 years ago.]
                        -------------------------------

                        you can buy me a beer, if you like MIGX

                        http://webcmsolutions.de/migx.html

                        Thanks!