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.

DataObjectManager Module /

Discuss the DataObjectManager module, and the related ImageGallery module.

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

[SOLVED] ImageGallery - Get the album names on Page.ss


Reply


4 Posts   1271 Views

Avatar
Raphael--

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.

Avatar
UncleCheese

Forum Moderator, 4096 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) %>
$Title
<% if ClassName = ImageGalleryPage %>
<% control Albums %>
$AlbumName
<% end_control %>
<% end_if %>
<% end_control %>

You get the idea...

Avatar
Raphael--

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.

Avatar
sdbruder

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