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

    I’m trying to use Maxigallery to have a gallery to have titles and descriptions in multiple languages. I’ve seen the thread at

    http://modxcms.com/forums/index.php/topic,20771.0.html

    about adding custom fields to the database. Would this be the best way of going about this?

    Michal.

      • 7923
      • 4,213 Posts
      Yes.. that’s the best way at the moment. In the templates, you can use [+maxigallery.config.lang+] with phx do decide what language to show.


        "He can have a lollipop any time he wants to. That's what it means to be a programmer."
        • 19315
        • 84 Posts
        Thanks! smiley

        Michal.
          • 7923
          • 4,213 Posts
          Wait..! smiley I just made the test version for maxigallery v0.6 available.. It has new &customFields parameter what you could use..


            "He can have a lollipop any time he wants to. That's what it means to be a programmer."
            • 19315
            • 84 Posts
            Oooh... that’s great! Thank you!
              • 19315
              • 84 Posts
              Hi,

              I’ve managed to add the custom fields, added their entry boxes to the manager, and they seem to save successfully. However, I have come across a problem...

              My site is in two languages (English and Polish), and I essentially have two copies of the document structure, one for each language (With TVs for page language, and for the ID of the corresponding document in the other language). For each gallery (i.e. a set of photos), I was hoping to have have two documents, but have the photos "based" in one (say English), and use the option &gal_query_ids in the other (Polish) document. I also would like just the "normal" display of the galleries.

              However, implementing this, the links to the individual photos in the Polish galleries take the browser to the photo in the original English document. This means the viewer now has an English page, with English menus etc.

              Is there a way to show the photos of a gallery of another document, but keep the user on the same document when they click on it?

              Michal.
                • 28042 ☆ A M B ☆
                • 24,524 Posts
                While I’m not an expert on exactly how MaxiGallery is coded, the gallery is dependent on the page it is "attached" to, so I wouldn’t think this is possible. How about having your gallery in a separate folder (unpublished), and using a cookie to hold the user’s language choice (actually just the ID of the language’s parent document) so you know which language to use and which section of the menu to show. I do this sort of thing on most of my multi-language sites.
                  Studying MODX in the desert - http://sottwell.com
                  Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                  Join the Slack Community - http://modx.org
                  • 7923
                  • 4,213 Posts
                  Quote from: michalc at Apr 09, 2008, 06:53 PM

                  Hi,

                  I’ve managed to add the custom fields, added their entry boxes to the manager, and they seem to save successfully. However, I have come across a problem...

                  My site is in two languages (English and Polish), and I essentially have two copies of the document structure, one for each language (With TVs for page language, and for the ID of the corresponding document in the other language). For each gallery (i.e. a set of photos), I was hoping to have have two documents, but have the photos "based" in one (say English), and use the option &gal_query_ids in the other (Polish) document. I also would like just the "normal" display of the galleries.

                  However, implementing this, the links to the individual photos in the Polish galleries take the browser to the photo in the original English document. This means the viewer now has an English page, with English menus etc.

                  Is there a way to show the photos of a gallery of another document, but keep the user on the same document when they click on it?

                  Michal.
                  You need to do a custom template(s) for the gallery that uses &gal_query_ids parameter and change the links that goes away from the page to stay in there.. eg. use [~[*id*]~] to build the links and add maxigallery parameters to that.. ?pic=[+maxigallery.picture.id+]&gal=[+maxigallery.picture.gal_id+] etc.. Ask again if you have troubles with some specific link..


                    "He can have a lollipop any time he wants to. That's what it means to be a programmer."
                    • 28042 ☆ A M B ☆
                    • 24,524 Posts
                    Now that is nice to know!
                      Studying MODX in the desert - http://sottwell.com
                      Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                      Join the Slack Community - http://modx.org
                      • 19315
                      • 84 Posts
                      Quote from: doze at Apr 10, 2008, 01:13 AM

                      You need to do a custom template(s) for the gallery that uses &gal_query_ids parameter and change the links that goes away from the page to stay in there.. eg. use [~[*id*]~] to build the links and add maxigallery parameters to that.. ?pic=[+maxigallery.picture.id+]&gal=[+maxigallery.picture.gal_id+] etc.. Ask again if you have troubles with some specific link..
                      For a picture that has an id of 4, in the gallery that has id of 14, I’ve tried to just manually put ?pic=4&gal=14, at the end of the address of the translation page (document 16), but no photo appears, and the I see "Picture: 0 / 0" (from the default template). In fact, after trying this at the end of the address for document 14, whatever I put as the value of "gal", the photo always appears. It looks as though the gal id is always being ignored. I’m not quite sure what I’m doing wrong...?

                      Michal.