Jump to content

Recommended Posts

Posted (edited)

This is easy as:

<ul class="thumbs">
<?php
$images = $page->blog_images;
foreach ($images as $image) {
    $thumb = $image->size(106, 106); // or whatever your thumb dimensions are
    echo "<li><a href='$image->url' class='fancybox'><img src='$thumb->url' alt='$image->description'></a></li>";
}?>
</ul>

Assumptions for this code snippet:

  • You will be styling .thumbs via CSS to get the grid style output
  • You are using $(".fancybox").fancybox(); as a trigger
Edited by marcus
  • Like 2
Posted

Thanks so much, Marcus.

I'll try that later.

I know with my "usual" CMS I could achieve this in about 15 - 30 mins so it's great to see it's as easy within PW :)

  • Like 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...