Where your adventure begins
Full Service Web HostingNetObjects Fusion 7 Websites Portal



About AllWebMenus

AllWebMenus is a powerful DHTML menu making program by Likno Software. Likno developed a free Fusion component for placing AWM menus on Fusion pages.

Note: The current component revision on the AWM site corrects this issue. Get the update!

The problem

When you place a AWM menu on your page, the component location determines where the menu will appear. During publishing, two segments of code are placed on the page. One where the component is placed and another just before the </body> tag. This location is necessary for browser compatibility. A problem arises when you place PHP code on your page that includes the string "</body>". The AWM component "looks for" the tag and places it's code just before the first one it finds.

When would you use a </body> tag within PHP code? Two examples are: 1) sending HTML-formatted E-mail using PHP. and 2) to close a page cleanly when a condition is detected and you choose to terminate a script before the entire HTML page is displayed.

The Workaround

Using a variable - an example:


  if($_SESSION["AuthUser"] == "webber")
   $bodytag = body; //set a variable to embed in tag
   echo "<b>Logged in: Robin - not authorized</b>";
  if($_SESSION["AuthUser"] == "admin")
   echo "<b>Logged in: Chuck</b>";

The use of the variable prevents the AWM component from "seeing" the wrong body tag and the AWM link code goes in the proper location.

this tutorial written and maintained by Chuck Joslin

Return to the TOP of this page

Posted 2 Sep, 2003

Updated 30 Sep, 2003

|  Fusion  |  Web Design  |  Hosting  |  Resources  |  gotFusion Store  | 

Problems with this page?  

All content copyright © 2002-2003 gotFusion LLC. The name gotFusion and the gotFusion ® logo are registered trademarks of gotFusion LLC
Copyright, legal notice & privacy statement