Jump to:

1347 Posts in 439 Topics by 514 members

Themes

SilverStripe Forums » Themes » Availability of entire page tree

Discuss SilverStripe Themes.

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

Page: 1
Go to End
Author Topic: 1484 Views
  • gaston
    Avatar
    Community Member
    24 Posts

    Availability of entire page tree Link to this post

    Salut,

    is there a way to have access to the full page tree?
    The idea is to create a more complex menu with dropline style. For that I need to know the entire menu structure so that I can feed all links to subpages into the menu structure.
    In my curernt understanding, only the subtree of the current page is available

    Ciao, Mathias

  • Willr
    Avatar
    Forum Moderator
    5462 Posts

    Re: Availability of entire page tree Link to this post

    No, you have full availability from any page. To generate a menu on a page you can do something like

    <% control Menu(1) %>
    // level 1
    <% control Children %>
    // level 2
    <% control Children %>
    // level 3
    .....
    <% end_control %>
    <% end_control %>
    <% end_control %>

    If you want to dynamically get the levels (rather then hardcoding 4 control Children have a look at the sitemap tutorial - http://doc.silverstripe.com/doku.php?id=tutorial:site-map

  • gaston
    Avatar
    Community Member
    24 Posts

    Re: Availability of entire page tree Link to this post

    Salut,

    thanks, I got the logic and it works. I got a very nice drop-line menu that I will incorporate into a theme. I now need to iron out the pixels and test it with different browsers, but it will soon be published.
    I also looked at the solution with the site-map example. This works as well but themes do not deliver php files ...

    Ciao, Mathias

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