gmoore Posted January 12, 2013 Share Posted January 12, 2013 How should, or would you recommend me to implement 'code' into a menu. My thought would be rather than the generic Menu Item. I would like to run a routine instead. And example might be a mini-map in the menu section. Or a list of items in the menu section. Should I add types into menus or something else. I just want your opinion before I start randomly. Greg Quote Link to comment Share on other sites More sharing options...
a_bertrand Posted January 13, 2013 Share Posted January 13, 2013 What do you need to do? I mean what do you need that the current system doesn't offer? Quote Link to comment Share on other sites More sharing options...
gmoore Posted January 14, 2013 Author Share Posted January 14, 2013 (edited) I was thinking about this before I responded. Let's say I have/want this type menu: Actions: -- Combat -- Craft -- Crimes -- Explore Your Space Ship: \\ ----------------- ---------------------- --------------- 43 Power 11 Thrust Your Characters: -- Fred -- Joe -- Timmy Communications: -- Forums -- Messages Just a way to insert some code rather than just generic menu options. Spice it up rather than just a list of words. My only other choice would be LeftMenu1, run some code, LeftMenu2 ... etc. Or I have to come up with a custom menu. Just a thought. And don't laugh at my graphic ... okay I will lol. Oh yeah, how about an icon for the menu choices also? That should just be an option. Greg Edited January 14, 2013 by gmoore Quote Link to comment Share on other sites More sharing options...
a_bertrand Posted January 14, 2013 Share Posted January 14, 2013 So basically you would want to show whatever html there. Well currently it's not supported. I would suggest then to rework the inside_menu and run hooks which output content maybe instead of the menu structure. Drawback is that you would then need to replicate some of the features across many modules. So far I don't have really a nicer option to give. Another option is to avoid that, and instead use a div with your content on some side but not placed in between the menu. Quote Link to comment Share on other sites More sharing options...
gmoore Posted January 14, 2013 Author Share Posted January 14, 2013 Thank you for response. I will consider a customized menu structure then. Just want it to look different than just a list of words. As always a lover of NWE. Greg Quote Link to comment Share on other sites More sharing options...
gmoore Posted January 14, 2013 Author Share Posted January 14, 2013 So maybe its better to put the code into the template then to run a routine to generate HTML. So Right Column could be: Main Menu -- NWE Option 1 -- NWE Option 2 -- NWE Option 3 Your Character (Run custom HTML) Other Menu -- NWE Option 4 -- NWE Option 5 Vague Example: <div id='sideMenuHeader'></div> <div id='sideMenuContent'><?php echo $content['sideMenuTop']; ?></div> <div id='sideMenuContent'><?php echo MyCustomPrettySection(); ?></div> <div id='sideMenuContent'><?php echo $content['sideMenuBottom']; ?></div> <div id='sideMenuFooter'></div> Like this? Greg Quote Link to comment Share on other sites More sharing options...
Someone Posted January 14, 2013 Share Posted January 14, 2013 <div id='sideMenuHeader'></div> <div id='sideMenuContent'><?php echo $content['sideMenuTop']; ?></div> <div id='sideMenuContent'><?php echo $content['customPrettySection']; ?></div> <div id='sideMenuContent'><?php echo $content['sideMenuBottom']; ?></div> <div id='sideMenuFooter'></div> Then in modules/yourmodulename/auto_post_content.php (http://www.nw-engine.com/wiki/index.php/Auto_post_content.php) $content['customPrettySection'] = PrettyMessage('message'); How I would do it Quote Link to comment Share on other sites More sharing options...
gmoore Posted January 14, 2013 Author Share Posted January 14, 2013 It works!!!! Ready to fall over thank you! It's amazing what I still don't know about this framework. Greg Quote Link to comment Share on other sites More sharing options...
Someone Posted January 14, 2013 Share Posted January 14, 2013 Awesome! Just love that feeling when something works! addictive Quote Link to comment Share on other sites More sharing options...
gmoore Posted January 14, 2013 Author Share Posted January 14, 2013 There are so many little cool things about the framework. Just trying to find them will lead me to drink. Greg Quote Link to comment Share on other sites More sharing options...
a_bertrand Posted January 15, 2013 Share Posted January 15, 2013 Happy you managed ;) And yes the framework offers loads of small goodies. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.