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.

All other Modules /

Discuss all other Modules here.

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

SS3 Gallery: Trouble Displaying the Gallery


Go to End


808 Views

Avatar
juneallison

Community Member, 110 Posts

24 September 2013 at 6:54am

Hi,

I'm working on a site where the SS3 Gallery module is installed. The catch is that this is a one page website with different panels. For regular page content, I can add something like this to my Page.ss template to grab the content of a specific page in the admin:

<% loop Page(pagename) %>
	$Content
<% end_loop %>

I don't know if I'm drawing a blank or missing something basic, but how do I output a gallery attached to a specific page? I noticed this snippet of code in GalleryPage.ss

 <% loop getGalleryImages %>
            <li class="$EvenOdd $FirstLast IGE{$Pos} galentries">
            <a href="$Image.URL" rel="prettyPhoto[gallery1]" title="$Description">            
            <% loop Image.SetWidth(280) %>
            <img src="$Link"  
            <% end_loop %>
            alt="$Title" />            
            </a></li>
 <% end_loop %>

...but this doesn't work in my regular page template.

Any help would be appreciated!

Thank you!

June