We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 53986
    • 12 Posts
    I have the moregallery plugin installed, and I have two separate pages. One page displays all of the photo albums I have, and displays the first image from each album as a thumbnail. When you hover over one of these thumbnails, a link appears to view the full corresponding album. It is pictured in the attached example 1. The moregallery plugin uses a template to generate the thumbnails.

    My problem is then having the album selection page link to the second page which should show all of the images from the selected album. The album selection page is at mysite.com/albums, and the actual selected album is at mysite.com/albums/*albumname*. I cannot figure out how to make the "view full album" link to the mysite.com/albums/*albumname* page.

    I believe it is something simple that I am missing. If anyone could tell me how I can link to the second page that would be wonderful. I have also included an image attachment (example2) of what the second page looks like.

    This question has been answered by brickthenick. See the first response.

      • 17301
      • 932 Posts
      Hey nick

      Attachments don't currently work here on the forums but if I understand what you're doing correctly then you just need to place the self containing link tag in your chunk that calls your thumbnails for each resource/album.

      Example would be
      <a href="[[~[[+id]]]]"><img src="thumbnail path"></a>

      Typing on a mobile phone so forgive any errors in writing.
        ■ email: [email protected] | ■ website: https://alienbuild.uk

        The greatest compliment you can give back to us, is to spend a few seconds leaving a rating at our trustpilot: https://uk.trustpilot.com/review/alienbuild.uk about the service we provided. We always drop mention of services offered by businesses we've worked with in the past to those of interest.
        • 53986
        • 12 Posts
        Quote from: lkfranklin at Feb 05, 2018, 01:17 PM
        Hey nick


        Example would be
        <a href="[[~[[+id]]]]"><img src="thumbnail path"></a>



        Essentially, here is the chunk that is created to list the albums


        <!-- ITEM -->
        <article class="portfolio-item pf-web-design">
        <div class="portfolio-image"> <a href=""><img class="img-responsive" alt="Open Imagination" src="[[+file_url:pthumb=`w=435&h=395&zc=1`]]"> </a>
        <div class="portfolio-overlay style-4">
        <div class="detail-info">
        <div class="position-center-center">
        <h3 class="no-margin">[[+name]]</h3>
        <hr class="balck">
        <span><a href="[[~[[+id]]]]">VIEW FULL ALBUM</a></span></div>
        </div>
        </div>
        </div>
        </article>

        As you can see, I am trying to have the "VIEW FULL ALBUM" be the link. What amendments can i make to this to make it work? The src="+[[file_url....... part is outputting the first image from the proper gallery in this instance. As you can see, I am trying to have the actual link to the album a few lines below as when you hover over the image an overlay shows.
        • discuss.answer
          • 53986
          • 12 Posts
          I have just found the solution. This is the final markup for the chunk. As I suspected, it was just something very simple that I had overlooked.

          The final markup for the working code is as follows.


          <!-- ITEM -->
          <article class="portfolio-item pf-web-design">
          <div class="portfolio-image"> <a href=""><img class="img-responsive" alt="[[+resource.pagetitle]]" src="[[+file_url:pthumb=`w=435&h=395&zc=1`]]"> </a>
          <div class="portfolio-overlay style-4">
          <div class="detail-info">
          <div class="position-center-center">
          <h3 class="no-margin">[[+resource.pagetitle]]</h3>
          <hr class="balck">
          <span><a href="[[+resource.alias]].html">VIEW FULL ALBUM</a></span></div>
          </div>
          </div>
          </div>
          </article>
            • 3749
            • 24,544 Posts
            <hr class="balck">


            Did you mean "black" ?? wink
              Did I help you? Buy me a beer
              Get my Book: MODX:The Official Guide
              MODX info for everyone: http://bobsguides.com/modx.html
              My MODX Extras
              Bob's Guides is now hosted at A2 MODX Hosting
              • 17301
              • 932 Posts
              haha smiley

              You may also want to remove the empty href tag on the first anchor or replace it with a div if your CSS scope doesn't depend on it.

              <article class="portfolio-item pf-web-design">
              	<div class="portfolio-image"> 
              		<a>
              			<img class="img-responsive" alt="[[+resource.pagetitle]]" src="[[+file_url:pthumb=`w=435&h=395&zc=1`]]">
              		</a>
              		<div class="portfolio-overlay style-4">
              			<div class="detail-info">
              				<div class="position-center-center">
              					<h3 class="no-margin">[[+resource.pagetitle]]</h3>
              					<hr class="black">
              					<span><a href="[[+resource.alias]].html">VIEW FULL ALBUM</a></span>
              				</div>
              			</div>
              		</div>
              	</div>
              </article>


              Also, I'm not sure if you need the .html after the [[+resource.alias]], but I could be wrong.
                ■ email: [email protected] | ■ website: https://alienbuild.uk

                The greatest compliment you can give back to us, is to spend a few seconds leaving a rating at our trustpilot: https://uk.trustpilot.com/review/alienbuild.uk about the service we provided. We always drop mention of services offered by businesses we've worked with in the past to those of interest.