Jump to:

7935 Posts in 1536 Topics by 943 members

DataObjectManager Module

SilverStripe Forums » DataObjectManager Module » [SOLVED] ImageGallery - Get the album names on Page.ss

Discuss the DataObjectManager module, and the related ImageGallery module.

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

Page: 1
Go to End
Author Topic: 1193 Views
  • Raphael--
    Avatar
    Community Member
    14 Posts

    [SOLVED] ImageGallery - Get the album names on Page.ss Link to this post

    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.

  • UncleCheese
    Avatar
    4085 Posts

    Re: [SOLVED] ImageGallery - Get the album names on Page.ss Link to this post

    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...

  • Raphael--
    Avatar
    Community Member
    14 Posts

    Re: [SOLVED] ImageGallery - Get the album names on Page.ss Link to this post

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

    Thanks again UncleCheese.

  • sdbruder
    Avatar
    Community Member
    4 Posts

    Re: [SOLVED] ImageGallery - Get the album names on Page.ss Link to this post

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

    1193 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.