Jump to content
MakeWebGames

Menu Suggestion


gmoore
 Share

Recommended Posts

Okay, I will admit I didn't research this 100%, but wanted everyone's opinion.

Topic: Menus

I see the system creating menus and sub menus in the lib/common.php. Awesome. Each application has the ability to attach to the menu and create sub areas on that menu ... such as Action, Communication using menu.php in the modules. Great. I want to suggest an additional option, menu_name be added. Then I wish the template to take each menu and place the code to run it where ever I wish. Such as MainMenu (left screen wide), FooterMenu perhaps or even more important RightMenu (when logged in) which is where I put in the Admin options. Just lets me not have such a long menu on the left with all those important admin menu choices on the bottom.

 

Many of the CMS systems do this and let us put it where we want. I mean the current system is certainly 100% functional. I just want it 100% flexible.

Thank you,

Greg

Link to comment
Share on other sites

Have a look at modules/insider_menu particularly auto_post_content.php

If you made your own version where you sort/remove/add what links you want, and add the content to $content['topMenu'] instead of $content['sideMenu'], then in your template echo $content['topMenu'] where you want it.

Link to comment
Share on other sites

Dunno know if its good enough.

But will get you there, without modifying the lib/common.php

As such this can be built by a module developer. Not that I am against having it in as a core module. Sooner or later I will be using multiple menus. By that time my game should be near release, and would probably just hand code in the links. They do not change that often on a live game. a module to manage this would be good for people who are not developers themselves though.

You can also build a module that reads your entries in the menu.php

Such as:

<?php
$menuEntries[] = new MenuEntry("Home", null, null, 0);
$menuTopEntries[] = new MenuEntry("Admin Top Home", null, null, 0);

 

Then in auto_post_content.php

RunHook("menu.php", "menuTopEntries");
//instead of RunHook("menu.php", "menuEntries");

 

Not tested any of this, but after browsing the code, this should be possible

Edited by Someone
Link to comment
Share on other sites

The system was thought / planned exactly as 1331 is describing it. Basically the side menu you currently have is just one of the possible menu (and actually the admin panel is using again the same structure too). You could just create a new module which runs with a different hook and fill a right or top or bottom or middle or whatever menu ;)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...