Watch tyro work without a net: trying to make my own gallery blocks
PermalinkThis is what the view.php includes:
<?php if (!empty($field_1_image)): ?> <a class="ccmGalleryImage" href="<?php echo $field_1_image->src; ?>"><img src="<?php echo $field_1_image->src; ?>" width="<?php echo $field_1_image->width; ?>" height="<?php echo $field_1_image->height; ?>" alt="<?php echo $field_1_image_altText; ?>" /></a> <?php endif; ?>
So long as I have the proper Javascript in the page source, this works: click the thumbnail, and up pops...the thumbnail. That's because I simply copied
<?php echo $field_1_image->src; ?>
into the anchor tag, just to have something to test the function of the lightbox. The problem is: I haven't got the slightest idea how to say, in PHP language, "Go get the URL to the original-size photo that you made this thumbnail from, and put it here."
Does anyone know?
/scenic/stdClass Object( [src] => /scenic/files/cache/804bc4ef9b11bc32d2c92d61c88321bb.jpg [width] => 199 [height] => 133)
$field_1_image is how Designer Content refers to the image chosen from the file manager and converted into a thumbnail. My problem is, the system "knows" what photo to find, since it's just done the conversion process...but I don't know how to tell it, "Look, you just did this. It's the same photo, okay? Just get the big one."
do a print_r($field_1_image); to see if the url to the original can be found in there (perhaps $field_1_image->url)