Using triggers to generate image varieties and pages

Hi,


Apologies if this is a very basic question, but I haven't been able to track down the answer here in the forums, so…



We're setting up a new site that will at its heart consist of a thumbnail image gallery powered by an Asset Listing, where the visitor will be able to click on a thumbnail and be taken to a page showing the large version of the image with related text information.



We've set up an Asset Builder form to allow for the uploading of the base image, plus some metadata to go along with it. Then we've set up a Trigger to generate the required image varieties from the base image.



What I'd like to know is if it's possible as part of the Trigger to also create a new page, grab the created page's ID or URL and automatically populate one of the base image's metadata fields with the asset ID or URL? Or is there some other way that this could be done?



Because I'm lazy (and don't have that much time) I'm hoping to avoid having to go in and manually add the page's asset ID or URL to each image's metadata.



Hope this makes sense. Any advice, or directions to somewhere else where this kind of problem is already answered, will be gratefully received.



Thanks.

If I were you, I wouldn't even use a page. I would use a paint layout for the image, which would then paint the "page" for the image asset. Then, on this "page", you could easily print the large image, or any image varieties and metadata of the main image.


This would allow you to not have to create standard pages for each image, which I assume would save much time and effort.

Another way you can do it is to use two listings. The first lists the images in whatever way you want and the second lists one image per page.


The first listing prints the thumbs and basic info. You link the thumb to the second listing, but pass in the image's position like this: ./?a=123?123_result_page=%result_number%

(WARNING: I may have that keyword wrong and please change 123 to the ID of your second listing)



Because the second listing shows one image per page, it goes straight to the correct image and shows you whatever information you put in the type format. This can be the full sized image and more information about it (including metadata).



So let's say you have 5 images per page in your first listing. You click the 4th image and it opens the second listing to page 4. Assuming all your sorting options are the same, you'll see image number 4 and nothing else.



Hope that makes some sense.

Thanks to both of you, Nic and Greg for these solutions.


Nic, I would never have been able to think outside of the box enough to think of applying a paint layout to an image! I'll have to have a go at it and see how it turns out. Wow…



For my current purposes probably Greg's solution will work slightly better (and I can understand how to implement it with my current Matrix knowledge levels) so I'll pursue it as my first option.



I'll post back here to let you know how I go, or if I run into any problems.



Again, many thanks.

Hi again, Greg,


Yep, the use of 2 asset listings (1 for image gallery, 1 for showing large version of image plus its metadata) is doing the trick quite nicely. Thanks again for your invaluable advice.



Just wondering - is there a similar and relatively easy way to have a thumbnail gallery where each thumbnail links to a page that shows TWO images? The two images' thumbnails would be next to each other in the gallery listing. (I'm putting together an image gallery which will include two images, one representing the Past and one for the Future, for each Local Government Area in our state, so it would be nice to be able to show the two large versions of the images for a particular LGA together on the one page.)



I'm guessing it wouldn't be so easy as linking to a page with one image on it, but I thought I'd ask in case you've come across this kind of requirement before and/or have seen a solution that might work here.



(Of course, I can always amalgamate the Past and Future images into one large image, I suppose! Only I figure that would mean each thumbnail would also have to be an amalgamation. But I digress…)



Thanks again.



Steve