Jump to:

10851 Posts in 2517 Topics by 1793 members

All other Modules

SilverStripe Forums » All other Modules » Extending Image Gallery template

Discuss all other Modules here.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1033 Views
  • kuenkuen82
    Avatar
    Community Member
    41 Posts

    Extending Image Gallery template Link to this post

    <div id="album-list">
       <ul>
       <% control Albums %>
             <li>
             <div class="defaultImage">
                <a href="$Link" title="$Title">
                <% if CoverImage %>
                   <% control FormattedCoverImage %>
                      <img src="$URL" alt="" />
                   <% end_control %>
                <% else %>
                   <span class="no-image"></span>
                <% end_if %>
                </a>
          <% control GalleryItems(3) %>
             $GalleryItem test
          <% end_control %>

                
             </div>
             <div class="galleryDetails">
                <h4>$ProjectCode <a href="$Link" title="$Title">$AlbumName</a> ($ImageCount photos)</h4>
                <div class="galleryDescription">$Description.LimitWordCount(60)</div>   
                <p>Related M Moser office: $MMoserOffice</p>
             </div>
             </li>
       <% end_control %>
       </ul>
    </div>

    Instead of using the Album Image, I was to use the first 3 images from the actual Album

  • kuenkuen82
    Avatar
    Community Member
    41 Posts

    Re: Extending Image Gallery template Link to this post

    <% control Albums %>
          <% control ImageGalleryPage %>
             <% control GalleryItems(3) %>
                $GalleryItem
             <% end_control %>
          <% end_control %>
    <% end_control %>


    Ok the above code show the first 3 images, but how do I get the current looped Album?

    1033 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.