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're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

DataObjectManager Module /

Discuss the DataObjectManager module, and the related ImageGallery module.

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

[SOLVED] ImageGallery - Get the album names on

Go to End

4 Posts   1530 Views


Community Member, 14 Posts

28 May 2009 at 4:56am

Edited: 28/05/2009 5:24am

Hi all,

I just would like to display the album names of each ImageGalleryPage in my main menu, to get a menu like that :

. Home
. MyGalleryPage A
-- Album 1
-- Album 2
. MyGalleryPage B
-- Album 1
-- Album 2
-- Album 3

It should be a general question about SilverStripe and oop but I spent hours on my issue and I can't figure it out..
(And yes, I'm still a young beginner on SilverStripe and oop but I can't wait to help the community, when I will be proficient enough.. !)

Thanks for your help.


Forum Moderator, 4102 Posts

28 May 2009 at 5:14am

I'm not sure how your site tree is set up. If all you have are gallery pages, you can pretty much just add it into your Menu control.

<% control Menu(1) %>
<% if ClassName = ImageGalleryPage %>
<% control Albums %>
<% end_control %>
<% end_if %>
<% end_control %>

You get the idea...


Community Member, 14 Posts

28 May 2009 at 5:23am

And it works ! That's absolutely brilliant ! I'm so impressed by Silverstripe..

Thanks again UncleCheese.


Community Member, 4 Posts

5 December 2009 at 10:03am

Edited: 05/12/2009 10:04am

Any ideia when my site IS NOT only gallery pages?
EDIT: Forget it, now Ive saw the <% if class= .... in your example :p