We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 20178
    • 82 Posts
    Hi all am sooo stuck, have a deadline and the gallery is totally stumping me have spent 2 days trying to work it out up all night but getting nowhere,

    I Am using revolution, have installed the gallery component fine,

    i then create a gallery with the following name ’gallery1’ upload some pics.

    then i have a main gallery page/resource, within this page i create a resource called ’gallery1’- this has a gallery tv so i can upload a thumbnail for the gallery.

    in my main gallery page
    i have the following call:

    <div id="testimonialHolder">[[!getResources?
    &parents=`25`
    &tpl=`galthumb`
    &includeTVs=`1`
    &processTVs=`1`
    ]]

    this places my thumbnail from my main gallery in a list on the main gallery page...

    the below is then placed on my main gallery page this allows my to open the specific sub gallery page.

    <div id="overall2">
    <div id="itemholder2">
    <p><a href="[[~[[+id]]]]" >[[+tv.Gallery Logo Thumb]]</a></p>
    </div>
    <div id="rightholder2">
    <h2>[[+tv.EventClient]]</h2>
    <h4>[[+tv.NameEvent]]</h4>
    <h5>[[+tv.EventDate]]</h5>
    <p>[[+tv.EventDetails]]<P>
    </div>
    </div>

    then in my gallery page i call the thumbs for the gallery with the same name as the page:



    [[!Gallery? &album=`[[*pagetitle]] ]]


    fine this places the thumbnails on that page, now i cannot figure out how to show the larger image, i want to use colorbox / slimbox / lightbox or something to that effect...

    help desperately need before i go quite mad.. huh huh huh huh
      • 14368
      • 56 Posts
      I’ve had no issues combining lightbox and Gallery, so it’s definitely possible.

      I’m using the snippets that come with Gallery rather than getResources, so my setup is a bit different to yours. Here’s what I’m doing:
      [[!GalleryAlbums? &toPlaceholder=`galleries`]]  
      [[!Gallery? &toPlaceholder=`gallery`&checkForRequestAlbumVar=`true`&checkForRequestTagVar=`true`]]
      [[!GalleryItem]] 
      [[!If? &subject=`[[+galitem.image]]`&operator=`isempty`&then=`
      <div class="image"> 
      Select a gallery to get started, then click on a thumbnail image below to browse photos.
      <ul>
      [[+galleries]]  
      </ul>
      </div>
      `]]
      [[!If? &subject=`[[+galitem.image]]`&operator=`notempty`&then=`
      <div class="image">
      <h2>[[+galitem.name]]</h2>
      <a href="[[+galitem.image]]&fltr[]=wmi|/i/watermark.png|C|100|10|10|0" rel="lightbox" title="[[+galitem.name]]"><img class="[[+galitem.imgCls]]" src="[[+galitem.image]]&fltr[]=wmi|/i/watermark.png|C|100|10|10|0" alt="[[+galitem.name]]" /></a>
      <div class="imageDescription">[[+galitem.description]]</div>
      <div class="imageLinks">Albums: [[+galitem.albums]]<br />
        Tags: [[+galitem.tags]]</div>
      </div>
      `]]
      <div id="gallery">
      [[+gallery]]
      </div>


      Note the ’rel="lightbox"’ call on the anchor tag for the galitem image. Clicking this image then uses the lightbox effect.

      Does that help at all?
        • 20178
        • 82 Posts
        hey thanks for getting back to me, i have sorted this issue now with a lot of help i must add! Im using prettyphoto with gallery really nice result!
        thanks,
          • 23889
          • 11 Posts
          @jobatkin


          I am using gaalery package.I have added code given by you...Bt it is nt working...Plz explain in detail and step by step...
            • 14368
            • 56 Posts
            I’m going to need more info than that to be able to help priyanka ...
            What exactly is not working? Do you see your gallery list? Do you see your gallery images? Does the lightbox work/not work? Please be specific about what you’ve done, what you’re seeing, and what you expect to see.
              • 23889
              • 11 Posts
              @jobatkin

              I have added gallery.I am able to see images.I want to add lightbox.How to add it.
              Plz check demo3.omesasystems.com link.in that I have added album.I want to add this with lightbox.
              do i have to add some files for lightbox lik lightbox.js???


              I am using following code:

              [[!Gallery? &toPlaceholder=`gallery`]]
              [[!GalleryItem]]
              [[!GalleryAlbums? &toPlaceholder=`galleries`]]

              <div class="gallery">
              <h2>Galleries</h2>
              <ul>
              [[+galleries]]
              </ul>


              <h2>Item</h2>
              </div>
              [[!+galitem.image:notempty=`
              <div class="image">
              <a href="[[+galitem.image]]" ><img class="[[+galitem.imgCls]]" src="[[+galitem.image]]" alt="[[+galitem.name]]" /></a>

              </div>
              `]]


              <hr />

              [[!+gallery:notempty=`
              <h1><a href="[[~[[*id]]]]" >[[+gallery.name]]</a></h1>
              <h2>[[+gallery.description]]</h2>

              [[+gallery]]
              `]]


              Thanks
                • 14368
                • 56 Posts
                Ah, that makes more sense.
                Yes, Lightbox is a Javascript tool so you do need to include a few JS files.
                I’ve used Lightbox 2 on my site, which has all the downloads and good instructions for how to set it up at http://www.lokeshdhakar.com/projects/lightbox2/#how

                I downloaded the files, uploaded them to my site, and then added this code in the head section of my template:
                	<link rel="stylesheet" href="/c/lightbox.css" type="text/css" media="screen" />
                
                	<script type="text/javascript" src="/j/prototype.js"></script>
                	<script type="text/javascript" src="/j/scriptaculous.js?load=effects,builder"></script>
                	<script type="text/javascript" src="/j/lightbox.js"></script>


                As well as adding the ’rel="lightbox"’ code to each image link.
                Hope that helps!
                  • 23889
                  • 11 Posts
                  Thanks a lot.... smiley
                    • 37210
                    • 131 Posts
                    @jobatkin Do I have to make any template chunks or anything?

                    I’ve tried copy and pasting the code you posted on the 12th into a resource, but lightbox still doesn’t work...?

                    I’ve uploaded the js and css files as well as linking to them in my header. Is there anything else you had to do to make it work?

                    Thanks,

                    Sarah