Jump to content

Your direction Alain


Recommended Posts

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.


Link to comment
Share on other sites

I was thinking about this before I responded.

Let's say I have/want this type menu:


-- Combat

-- Craft

-- Crimes

-- Explore

Your Space Ship:





43 Power

11 Thrust

Your Characters:

-- Fred

-- Joe

-- Timmy


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


Edited by gmoore
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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?


Link to comment
Share on other sites

<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

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.

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.

  • Create New...