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.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Lost 'TabMenu' in relocated site


Go to End


3 Posts   711 Views

Avatar
natty

Community Member, 2 Posts

22 December 2013 at 9:43am

Greetings! I am a developer with no familiarity with Silverstripe at all and need a little guidance. I've been tasked with relocating a SS site to a new server, and almost have it perfectly transferred but for a couple of issues. The site has a secondary menu below the main page banner and this seems to be controlled in mysite/code/Page.php with this function:

function topTabbers() {
  $whereStatement = 'ShowInTabMenu = 1 AND ShowInMenus = 0';
  return DataObject::get('Page', $whereStatement); 
 }

It should be displayed within a div whose class is nav-menu-banner but nothing appears. Trouble is, I've no idea where to look for this. I'm impressed with what I've seen in SS so far, and a little success here will make me look more closely, depending on the degree of community support.

So - can anyone suggest where I look to find why this menu is not appearing?

Thanks in advance, and Merry Christmas!

Avatar
Willr

Forum Moderator, 5523 Posts

23 December 2013 at 11:20am

Have you got any records with ShowInTabMenu set to 1? By the sounds of it, you'll have a tick box in your CMS to activate that option on each page. If no pages have that option set to true then of course that filter will return nothing :)

Avatar
natty

Community Member, 2 Posts

23 December 2013 at 11:59pm

Thanks Willr. No, there are no such records. For now I've manually added the missing html to the template files, which solves the immediate problem, but it would be good to understand where this went wrong, if anyone has any suggestions.
Martin