• Resolved bellechan

    (@bellechan)


    Hello,

    I have read through the documentation and the support forum, but I cannot figure out how to do what I want :

    – Each product has 2 images : one where we can see the full product, one where we can see the product up close for the texture

    – I want just a thumbnail of the texture image with the title of the product on the product listing page

    – When you click on the thumbnail, you see a list of all images that are related to this product in small at the bottom of the lightbox. At the top it would be the zone where you see the image in large. So you can switch between the alternative product image to display in the large view by clicking on their thumbnails at the bottom of the lightbox.

    – Ideally, the previous and next button would switch to the previous or next product in the list (but not to the next sub-image of the same product), but if this is too complicated, I could just remove them and force people to go back to the listing so it is not confusing.

    It took me a while, but I finally understood that there were no template for what is shown in the lightbox (wouldn’t it be useful?). So is it just a matter of putting everything in the default and then hiding stuff with CSS? I have already managed to show the secondary images at the bottom, but when you click on them it takes you out of the lightbox and shows you the image directly in the browser.

    Should I create my own thumbnails and put them as the main image, and make the lightbox open up on the secondary images only? How would I do that?

    Should I use the public option, adapt the single-catablog-items.php template to what I want to show in the lightbox and make it open up in a lightbox? (I’m already using PrettyPhoto for other stuff in my theme, so I could call that to open up the single product page).

    Thank you very much!

    https://wordpress.org/plugins/catablog/

Viewing 11 replies - 1 through 11 (of 11 total)
  • Hi bellechan, can you share your URL so that we can check. Also you might be able to achieve what you want by integrating the single-catablog-items.php into your theme. Here is some documentation you might like to read.

    In regards to your comment below.

    It took me a while, but I finally understood that there were no template for what is shown in the lightbox (wouldn’t it be useful?).

    At the present that option has not been adapted into the plugin.

    Let me know if I am on the right track with your request.

    Kind regards

    Thread Starter bellechan

    (@bellechan)

    Hello mbrsolution, thank you for your quick reply. Here is the link of my test page : http://www.tapisandreviau.com/fr/salle-exposition-virtuelle/

    I have already copied my single.php and archive.php and renamed them accordingly as a test : http://www.tapisandreviau.com/fr/echantillon/5488/

    But I wasn’t sure where to go from there or if it even was the right option to pursue.

    Thank you for your time and pointing me in the right direction ^_^

    Hi bellechan, I had a look at both URL above. Can you share with me what are you planning to do in each URL.

    Kind regards

    Thread Starter bellechan

    (@bellechan)

    Here are two JPEG of mock-ups I had made to show the client how it could look like :
    Catalog: https://db.tt/SWa9s5FE
    Lightbox: https://db.tt/Zp64tvAR

    Thread Starter bellechan

    (@bellechan)

    So I’m testing different things to see how I could use the single template, but I can’t seem to be able to make the link of the thumbnail to go to the single page. Instead it links directly to the original image. If the lightbox is activated, it opens the lightbox with the same template, if not, it bring to the original media file.

    It is currently set as the gallery template, so I have the code ‘‘ in the template. If I turn off the lightbox, shouldn’t the %LINK% token bring me to the single page instead of the media file?

    This is what I had understood from this comment on the catablog site: http://catablog.illproductions.com/2010/11/help-lightbox-is-not-working/#comment-794

    Thank you!

    Hi bellechan, can you share your template code here so that I can analyze it as well.

    Also with each item have you added a URL link to the image from the back end?

    Have a look at this post and check Point number 5.

    Kind regards

    Thread Starter bellechan

    (@bellechan)

    Hello mbrsolution,

    I was using the unmodified gallery template to make my tests…
    The point 5A in your post made me realize it was just a question of using %PERMALINK% instead of %LINK%. Thank you for that hint.

    And I have managed to make the permalink open in my theme’s lightbox so all is good. All I have to do now is figure out how to make the single-catablog-items.php template to show what I want 🙂

    Thank you for pointing me in the right direction!

    Hi bellechan, that is good news 🙂 So is this support ticket resolved?

    Kind regards

    Thread Starter bellechan

    (@bellechan)

    Hello,

    Sorry for the late reply, but I wanted to wait until it was all done before answering so I could report what I did, just in case someone wants to do the same. Maybe there is a better way of doing it… but this worked for me :

    1. Used the single-catablog-items.php option and used this in the single template :

    <div id="catablog-photo-viewer">
    </div>
    <div id="catablog-thumb-list">
    	%MAIN-IMAGE%
    	%SUB-IMAGES%
    </div>

    2. Did not activate the plugin’s lightbox, but used the one from my theme (PrettyPhoto) by adding the necessary code (class=”prettyphoto” and ?iframe-true so the lightbox can open the single item page) in the default template:

    <div class='catablog-row %CATEGORY-SLUGS%'>
    	<div class="catablog-images-column">
    		<a href="%PERMALINK%?iframe=true&width=100%&height=600" class="prettyPhoto catablog-image" title="%TITLE%">
    		<img src="%IMAGE-THUMBNAIL%" alt="%TITLE%" />
    		</a>
    	</div>
    		<h3 class='catablog-title'>%TITLE-LINK%</h3>
    </div>

    3. Used the CSS to position the thumbnails and used a bit of javascript to be able to switch from one picture to another in the larger area (photo viewer) :

    <script>
    jQuery(document).ready(function() {
      jQuery('#catablog-thumb-list a').click(function(evt) {
      	evt.preventDefault();
      	var imgPath = jQuery(this).attr('href');
      	var oldImage = jQuery('#catablog-photo-viewer img');
      	var newImage = jQuery('<img src="' + imgPath +'">');
      	newImage.hide();
      	jQuery('#catablog-photo-viewer').prepend(newImage);
      	newImage.fadeIn(1000);
      	oldImage.fadeOut(1000,function(){
        		jQuery(this).remove();
      	}); // end fadeout
      }); // end click
      jQuery('#catablog-thumb-list a:first').click();
    });
    </script>

    I think that’s it… Seems to work pretty well. 🙂

    Hi bellechan, that is great to hear. I saw your URL above and it looks great. well done 🙂

    I might create a tutorial from your information above on my website when I have some free time 🙂 If you don’t mind.

    If your issue has been resolved could you mark this support thread as resolved.

    Thank you kindly.

    Thread Starter bellechan

    (@bellechan)

    Sorry, I forgot! Now it is marked as resolved 🙂

    Feel free to use any of this information to create your tutorial!

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Navigating between secondary images in the lightbox’ is closed to new replies.