Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » New Page Type - Level 1 navigation missing

Our old forums are still available as a read-only archive.

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

Page: 1
Go to End
Author Topic: 1305 Views
  • Aaron
    Avatar
    Community Member
    63 Posts

    New Page Type - Level 1 navigation missing Link to this post

    Hi,

    I've been using the data object tutorial to make a new page type and have this working.

    The problem now is that the top navigation tabs refuse to display on this page type. I have narrowed this down to the fact that the page simply doesn't have access to Menu(1) object. It is actually outputting the container for the menu, but it is an empty UL.

    Here is my code for the page type:

    <?php
    class ToursHolder extends Page {

    static $allowed_children = array( 'Tour' );

    }

    class TourssHolder_Controller extends Page_Controller {

    }
    ?>

    The code for the menu is in Page.ss, and like I said, this page type is finding it, it simply doesn't have the Menu(1) to output the tabs.

    Cheers
    Aaron

  • SilverRay
    Avatar
    Community Member
    167 Posts

    Re: New Page Type - Level 1 navigation missing Link to this post

    Well, for starters you have a 's' too much in:

    class TourssHolder_Controller

  • Aaron
    Avatar
    Community Member
    63 Posts

    Re: New Page Type - Level 1 navigation missing Link to this post

    Man I feel like an ass....

    Cheers SilverRay

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