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've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Archive /

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

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

New Page Type - Level 1 navigation missing


Go to End


3 Posts   1814 Views

Avatar
Aaron

Community Member, 63 Posts

24 May 2008 at 6:52pm

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

Avatar
SilverRay

Community Member, 167 Posts

24 May 2008 at 7:11pm

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

class TourssHolder_Controller

Avatar
Aaron

Community Member, 63 Posts

24 May 2008 at 8:02pm

Man I feel like an ass....

Cheers SilverRay