Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo

Gallery module: List of child galleries


Go to End


1411 Views

Avatar
cvk

Community Member, 1 Post

26 November 2007 at 6:44am

Edited: 26/11/2007 6:53am

I want to embed a simple gallery in my site. Installing the gallery module and adding a few images was delightfully easy.

As my galleries should have subgalleries, I created the following Layout/GalleryPage.ss:

<div id="Content" class="typography">
        <% include Breadcrumbs %>
        <% include GalleryPageContent %>
        <ul>
        <% control Children %>
                <li>
                        <a href="$Link" title="View gallery &quot;{$Title}&quot;">$Title</a>
                </li>
        <% end_control %>
</ul>

Now I want to add a small preview image (e.g. the gallery's first image) to each entry, similar to the tutorial's staff page, but haven't found out yet how to achieve this. Any ideas?

I'm new to SilverStripe, so please bear with me ;)