We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 40906
    • 23 Posts
    coensiebenheller Reply #1, 13 years ago
    I have a question concerning the Gallery add on.

    The website i'm building has an Gallery on almost every page. The client wanted a website that has photographs on every page. But i've noticed that on most of the pages he uses the same album. My question here is; can i somehow set an default album for every page? So for example the default album is [[*main-album]] witch always shows, but when the client choses an album manually it becomes the selected one.

    I hope i'm making myself clear.

    Thnx for the help!

    P.s. this is the call i'm making right now:

    [[Gallery? &album=`[[*sidebarAlbum]]` &thumbTpl=`thumbSidebar` &thumbQuality=`65` &thumbProperties=`{"f":"jpg"}` &thumbZoomCrop=`1` &useCss=`0`]]
      • 3109 ☆ A M B ☆
      • 894 Posts
      How would your client change the default album? Via a Template Variable or they have to manually edit the Gallery call?

      If you are doing it with a TV then you could do something like this:

      
      [[Gallery?
      &album=`[[*sidebarAlbum:empty=`[[*main-album]]`]]`
      &thumbTpl=`thumbSidebar`
      &thumbQuality=`65`
      &thumbProperties=`{"f":"jpg"}`
      &thumbZoomCrop=`1`
      &useCss=`0`]]
      


      Now your sidebarAlbum Template Varaible needs to be an input type of galleryalbumlist.

      Good luck.
        Benjamin Marte
        Interactive Media Developer
        Follow Me on Twitter | Visit my site | Learn MODX
        • 40906
        • 23 Posts
        coensiebenheller Reply #3, 13 years ago
        Hi Benjamin,

        Thanks for your help! That is exactly what is was going for. Only for some reason it won't work?

        I now have 2 TV's one called "impressions" and one called "sidebarAlbum". The impressions TV is the default album i want to show on every page. Both have an input type of galleryalbumlist. What am i still doing wrong here? If i select a album in the sidebarAlbum TV it shows. But when i leave it empty it doesn't show the "default" impressions album?

        [[Gallery?
        						&album=`[[*sidebarAlbum:empty=`[[*impressions]]`]]`
        						&thumbTpl=`thumbSidebar`
        						&thumbQuality=`100`
        						&thumbProperties=`{"f":"jpg"}`
        						&thumbZoomCrop=`1`
        						&useCss=`0`]]


        Thanks in advance!
          • 42046
          • 436 Posts
          Is the [[*impressions]] TV defined on the particular resource you're making this Gallery call on?

          If not you'll need to use ShowTV or fastField to use [[*impressions]] in a global manner:

          http://modx.com/extras/package/showtv2
          http://modx.com/extras/package/fastfield
            • 3109 ☆ A M B ☆
            • 894 Posts
            Try calling gallery uncached that should solve your problem.

            Good luck.
              Benjamin Marte
              Interactive Media Developer
              Follow Me on Twitter | Visit my site | Learn MODX