Using PHP inclusion yet with menu inside table

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
ukboy
Beginner
Beginner
Posts: 4
Joined: Tue Jul 12, 2005 5:17 pm

Using PHP inclusion yet with menu inside table

Post by ukboy »

I am (still) using plain ol' tables for my layout and have the menu embedded inside a <td>. However, because some of my URLs are dynamic, with all sorts of nasty session things, I need to invoke the menu using the PHP method and all that $mm_style stuff.

Although I have implemented the menu as desired, I'm a little concerned about the fact that I have not stuck to the suggested/urged practice of only declaring the main menu inside the table cell and calling the submenus outside.

I have used the menu before in a table cell except not thu PHP so on that occasion the submenus were called via menu_data.js outside the cell as recommended. My current implementation seems to work okay in recent browsers I've tried (IE 6 /Opera 7/NN 7/Firefox on Win) but obviously that isn't comprehensive.

Submenus don't appear in NN4, even though I don't care about that browser, but it suggests that maybe I should tweak my inclusion of the menu somehow.

Any thoughts anyone - is this going to be a problem?
User avatar
Andy
Milonic
Milonic
Posts: 3308
Joined: Sun May 19, 2002 8:23 pm
Location: Menu Developer
Contact:

Post by Andy »

Hi,

In the download (latest) there is a PHP/tablebasedmenu sample that shows how to use the menu in a table with PHP. You need to use drawMenus(); instead of commitMenus();

Should help the menu work in all browsers

Cheers,
Andy
ukboy
Beginner
Beginner
Posts: 4
Joined: Tue Jul 12, 2005 5:17 pm

Post by ukboy »

Thankfully I have the latest version and used the example to build into my own menu, so it seems I have done the implementation correctly.

I suppose, just because it wasn't explicitly mentioned, a few alarm bells went off since nothing was declared in the <head> tag and all of the PHP code just seemed to be in the body.

So, just to clarify, if I include() the two external PHP files just after the body tag and then the rest within the TD it should be fine? I only ask because the PHP example has no other content and is all together - or are you saying that because of the Commit/Draw difference that it can all just be lumped together in the TD?
Post Reply