MenuMagicII - User Guide
MenuMagicII - User Guide
Overview
WHAT’S INCLUDED?
Your purchase of Menu Magic II includes everything you need to produce an efficient,
attractive menu in your choice of layout—Horizontal Tab Bar, Vertical Flyout, or Hori-
zontal Dropdown. Here’s what you get:
1. The Menu Magic II Extension System.
2. Custom CSS files for each menu Type and Theme.
3. Complete image sets to get you started and provide inspiration. Each menu
Type/Theme has its own graphics. Each menu type has a Basic theme set and a Bonus
theme set (six sets in all).
4. Editable Fireworks documents for each image set.
5. A detailed User Guide.
AN EXTENSIBLE EXTENSION
Menu Magic II was designed to enable you to add ThemePaks that fully integrate with
the interface—providing you with new image and layout possibilities. To find out more
about Menu Magic II ThemePaks, and to see them in action, visit the ThemePak page at
Projectseven.com:
http://www.projectseven.com/mm2/themes
What’s Included? | 2
3 | Support
Support
We hope you enjoy using Menu Magic II. We certainly enjoyed making it! Before you
seek help, please make sure you have read this entire User Guide. Your answer may well
be contained inside.
If you cannot find your solution in the User Guide, here’s how to proceed:
SUPPORT OPTIONS
3 | Support Options
Support | 4
E-MAIL
Point yourself at:
support@projectseven.com
Support Options | 4
5 | Contents
Contents
TABLE OF CONTENTS
OVERVIEW............................................................................................................................................ 1
SUPPORT................................................................................................................................................ 3
CONTENTS ............................................................................................................................................ 5
5 | Table of Contents
Contents | 6
Table of Contents | 6
7 | Contents
7 | Table of Contents
Contents | 8
Embedded CSS for Menus Not Using Menu Magic II Themes ............................................... 90
External CSS for Menus Using Menu Magic II Themes.......................................................... 93
Doctypes................................................................................................................................... 97
Creating a Snippet...............................................................................................................................98
Inserting a Snippet ............................................................................................................................100
Table of Contents | 8
9 | Contents
9 | Table of Contents
Section I - Set Up | 10
Section I - Set Up
This section provides instructions for unpacking and archiving the Menu Magic II Exten-
sion Kit and for creating a new Dreamweaver web site.
Keep this as an archive only. Never make any changes to the files in this folder.
To work through the tutorials in this User Guide, you'll copy and paste the work files from
this archive.
DEFINING A SITE
You need to define a site so that Dreamweaver knows where to store all of your files.
Additionally, the page you are working on must be a saved page in that site. Dreamweaver
makes this process very easy.
In order for Menu Magic II to work correctly, you must always work within a properly defined Dreamweaver site. Menu
Magic II will work in any defined Dreamweaver site. For the purposes of going through the Menu Magic II User Guide Tu-
torials, we will create a new site.
Note: Dreamweaver MX users—Please select the Advanced Tab in the Site Definition dialog to create a basic site.
-Enter a meaningful name for your site (we've used Menu Magic II).
-Click the folder icon to browse to the folder you created above (C:\Menu Magic II) and
click Select.
-Click OK to create the new site.
-Click OK if Dreamweaver asks you to create an initial site cache.
When the Site Definition window closes, you’ll see your new site listed in the Site panel
(DWMX) or Site Window (DW 4).
Note: If you are not sure how to Define a Site in Dreamweaver, please refer to the Dreamweaver Help System (Press F1)
or the Dreamweaver Manual.
Defining a Site | 12
13 | Section I - Set Up
-Browse to the Studio VII/Menu Magic II Archive folder you created earlier and choose
M2 User Guide/P7_MM2_20.mxp
-Click Install.
-Click Accept in the License window.
Dreamweaver will inform you that it must be closed and restarted for the changes to take
effect.
-Click OK.
You should now see the Menu Magic II by PVII extension listed in the Extension Manager
list of Installed Extensions.
-Close Extension Manager.
-Close Dreamweaver.
-Restart Dreamweaver.
Note: For a complete discussion of the Menu Magic Insert system, please see Appendix 1
-Click on the Menu Magic II icon on the Insert Bar, or click Insert→Studio VII→Menu
Magic II by PVII
1-Horizontal Tab Bar will be set in the Menu Type selection list. Leave it selected.
NOTE: After you select the Basic theme, the thumbnail image to the right of the option lists will change to show an illus-
tration of the Style Theme that you have chosen. Also note that the menu images are automatically added to the Menu
Images list and that the Left Position and Top Position will change to settings optimized for the selected Menu Type and
Theme.
Because you’ve chosen a Menu Magic II Theme, all options will be optimally set for
you.
-Click OK
The menu will appear on your page instantly.
Menu Magic II has written all of the HTML markup; it’s created and linked the appropri-
ate style sheets and JavaScript file; and it’s written all of the image files (as well as the
editable Fireworks PNG).
All necessary folders to hold these items have been created for you.
The following folders and associated items were created when you clicked OK.
FIGURE 13
1. Local_Files/Fireworks: Contains the editable Fireworks PNG for the Theme you
chose.
2. m2css: Contains the external CSS files for the menu, which are now linked to your
page.
3. m2img: Contains all of the web images for the menu.
4. m2scripts: Contains the Menu Magic II external JavaScript file, which is now linked
to your page.
That’s all there is to it.
-Save your page.
Mouse on and off all of the buttons to get a feel for how the menu works.
NOTE: To support Netscape version 4 browsers, you should add the Dreamweaver Netscape Resize Fix to the page. To
do so, choose Commands→Add/Remove Netscape Resize Fix.
FIGURE 15
NOTE: After selecting Dropdown from the Menu Type drop down menu the image to the right of the drop down menus
will change to reflect the Dropdown menu. The Left Position, Top Position and Submenu Width values will change. The
Persistent Submenu and Auto Submenu checkboxes will also become deselected.
NOTE: After you select the Bonus theme, the thumbnail image changes to reflect your choice, the appropriate images are
automatically added to the Menu Images box, the menu options are all set for you—and the first button is set as the De-
fault Button (it displays a down state when the page loads and when the menu is inactive).
All of the options appropriate for this menu have been automatically selected.
-Click OK to insert the menu on your page.
FIGURE 17 – THE BONUS THEME AUTOMATICALLY ADDS A COOL BACKGROUND IMAGE TO YOUR PAGE, TOO.
If you check the contents of your Local_Files, m2img, and m2css folders, you’ll see that all of the assets that relate to
this new menu have been added automatically. Menu Magic II detected the presence of the folders and added all new
files it needed. The JavaScript file was detected and, if needed, updated.
-Save the page and then press F12 to preview in your default browser.
Mouse over any of the buttons to expose its submenu.
FIGURE 18 – MENU BUTTON CHANGES COLOR WHEN WHEN HOVERED OVER TO MATCH ITS SUBMENU
Mouse off the menu and Button 1 reverts back to its down state because it is set to be the
Default Button.
FIGURE 19 – BUTTON 1 REVERTS TO ITS “DOWN STATE” WHEN THE MENU IS INACTIVE
Tip: To prevent CSS styles from being lost when the window is resized in Netscape 4, you should add Dreamweaver’s
Netscape Resize Fix to the page. To add it, choose Commands→Add/Remove Netscape Resize Fix.
NOTE: After you select the Bonus theme, the image next to the drop down menus will change to reflect the chosen Style
Theme. Also, note that the images are automatically added to the Menu Images box and the Left Position, Top Position,
and Submenu Width values will change.
As with the first two menus, Menu Magic II has taken care of all the necessary assets for
this particular menu—including an integrated page background.
-Save the page
-Press F12 to preview in your default browser.
FIGURE 23 – COMPLETED MENU IN MSIE6 (NOTE THAT “SUBLINK 1.2” IS THE “DOWN STATE TEXT LINK”)
-Select 1-Horizontal Tab Bar from the Menu Type selection list.
-Select Bonus Theme from the drop down menu next to Style Theme.
-Click in the No Submenu (NavBar Only) checkbox to select it.
-Click OK
Mouse on and off the buttons to see how the menu works.
Menu Magic II is designed to protect your existing menu and will not re-write content that
you have placed in the submenus. You can safely make changes to existing menu sections
without losing your work. Additionally, the Modify mode will affect neither the style
sheet(s) nor existing images. This allows you to edit images and style sheet(s) and still use
the Menu Magic II Modify system to fine tune your menu—with complete peace of mind.
The Modify system will write the code it needs to, while safeguarding your content. Menu
elements will have their IDs and/or names reassigned with respect to their new position in
the menu. No matter how many menus you add, delete, or relocate—the menu names and
IDs will always be meaningful and sequential—in keeping with each element’s onscreen
placement.
User-entered modifications to existing menu image links will always be preserved. Any
modified Alt tags, onClick events, or Href strings will be properly carried through to the
rebuilt menu. The content of the submenus is never touched and is transferred (if neces-
sary) to the revised submenu so that all menus remain sequentially placed and ID'd. A
unique feature of the Modify system is its ability to rename any boilerplate text links. If
the system encounters the unmodified text links, it will rewrite them to properly reflect the
modified submenu location. That is, Sublink 2.1 will become Sublink 3.1, if your modi-
fications result in a new button being inserted between the first and second buttons.
Note: For a in-depth discussion of the Modification system, please see Appendix 1
-In the Menu Images box, select (click) the last button (hbscb6.gif).
-Click the Delete button.
-Click OK.
NOTE: Menu Magic II will delete the menu and its associated submenu <div> element from the page.
The image that you selected will he highlighted in the Menu Images box. It will be the
last image in the list. You can use the Up and Down buttons to place the image where you
want it in the menu—but we’ll leave it last because that’s where it belongs.
FIGURE 31
Note:The new button is distinguishable from the others by its lack of a name at the end of its description (p7TBimXX). The
name will be added after you click OK.
Tip: If you wish, you can now set the Link Separator for the new submenu that will be added.
-Click OK.
The new menu button image will be added to your page.
-Save the page, but leave it open.
-Click OK.
-Preview the page.
Menu Magic II has logically re-ordered everything perfectly. Menu buttons and their
submenus have been repositioned and all existing content (and the underlying HTML)
maintains its correct relationships.
-Choose Modify→Studio VII→Modify Menu Magic II by PVII again
-In the Images List, select hbscb2.gif
-Click the Up button once to move it back to its original position.
-Click OK
The buttons are now back in their original order
The next few tasks will explore the power of the Set Menu Magic II Behavior. It’s an enormously powerful part of the Menu
Magic II Suite and permits you to quickly change the default menu state—how the menu looks when the page first loads in
a browser.
When hz_tab_bar.htm first opens, the first menu button is in the Down State. That is, it
is set to be the Default Menu Button.
FIGURE 35 – MENU BUTTON ONE IN THE DOWN STATE WHEN PAGE FIRST LOADS
Let’s reset this menu so that Button 3 is the Default Menu Button.
-Click the <body> tag on the Tag Selector bar along the bottom edge of the Design View
window.
-Open the Behaviors Panel and make sure its heading has changed to <body> Actions.
-Double-click the onLoad Event for the Set Menu Magic II by PVII Action.
FIGURE 36
FIGURE 38 – BUTTON 3 IS NOW THE DEFAULT AND DISPLAYS IN THE DOWN STATE WHEN THE PAGE FIRST LOADS
FIGURE 39
-Double-click the onLoad Event for the Set Menu Magic II by PVII Action.
-Click OK.
-Save the page, but keep it open.
FIGURE 41
-Double-click the onLoad Event for the Set Menu Magic II by PVII Action.
FIGURE 43
-Double-click the onLoad Event for the Set Menu Magic II by PVII Action.
The Set Menu Magic II by PVII window will open.
FIGURE 44
The class name should not be changed unless your CSS skills are advanced. We rec-
ommend that you leave the class assignment as is. If you want to change the color (or
other attributes) of the Down State Link, you can edit the p7tbdn rule in your Menu
Magic II Style Sheets.
For an in-depth discussion of the Down State Class Name, see:
Appendix 1: Down State Class Name.
-Save the page, but keep it open.
FIGURE 45
-Double-click the onLoad Event for the Set Menu Magic II by PVII Action.
The Set Menu Magic II by PVII window will open.
DELETING SUBMENUS
-In flipflop.htm, open the Layers panel
-Shift-Select the six submenu Layers:
1. p7Tbsub10
2. p7Tbsub20
3. p7Tbsub30
4. p7Tbsub40
5. p7Tbsub50
6. p7Tbsub60
-Preview the page and you’ll see that the menu works wonderfully as a Navbar only—
without submenus.
-Click OK.
Powerful Magic.
Inspirational, it is.
-Click anywhere inside of the text link that you want to change.
-Click the <a> tag on the Tag Selector bar at the bottom of the Design View window.
The <a> tag should become bold, and the text for the link should become highlighted.
-Type the new text for the link. It should overwrite the selected text.
With the text link still selected, look at your Properties Inspector
-Click the folder icon to the right of the Properties Inspector Link box.
The Select File window will open.
-Click OK.
NOTE: If you change the link text, and that link is your Down State Link, you will need to edit the Set Menu Magic II be-
havior on the <body> tag to reflect the new link text. See more…
-Click the folder icon to the right of the Properties Inspector Link box.
ACCESSIBILITY NOTE
When you activate the button image links, you also provide a way for people using assis-
tive technology (or those who have JavaScript disabled) to be able to navigate your site.
For this reason, we recommend that you always activate your button image links.
Menu Magic II puts the HTML on your page, in Dreamweaver, and it’s always editable.
-Select p7TBsub10
-Click the eyeball column, to the left of the Name: p7TBsub10, until the little icon
changes to an open eye.
FIGURE 59
p7TBsub10 will become visible in your Dreamweaver design window and its visibility
property is now set to: Visible. Click anywhere on the page and p7TBsub10 will not go
away!
A different technique can be utilized. You can simply copy the text links inside your de-
fault submenu and paste them onto your page—preferably at the bottom of the main con-
tent.
FIGURE 60-B – THE SUBMENU LINKS HAVE BEEN COPIED AND PASTED AT THE BOTTOM OF THA MAIN CONTENT AREA
Menu Magic II includes a Remove feature that allows you to quickly remove an existing
Menu Magic II system from your page. This facility allows for easy removal when simply
prototyping pages or when a total redesign is necessary.
The system will look for, and remove, all of the elements on your page that follow the
Menu Magic II naming convention:
1. The MM2 Trigger Divs - All divs (layers) whose id (name) starts with p7TBtrig
2. The MM2 Images - All images whose name (or id) starts with p7TBim
3. The MM2 SubMenu Divs - All divs (layers) whose id (name) starts with p7TBsub
Additionally, the system will also remove these related components:
1. The Menu Magic II JavaScript - If the system detects that you are using the linked
JavaScript file (as created by the Insert Menu Magic II) then it will remove the link to the
JavaScript file on your page. It will not delete the actual external JavaScript file. If the
system detects that the scripts are on your page, then those scripts will be removed.
2. The Menu Magic II event triggers - The system will remove any setMM2 and
trigMM2 events it finds on the <body> tag, onLoad event. Any other existing onLoad
events will not be affected.
The system will not attempt to remove any linked or embedded style sheet in order to pro-
tect any modifications you may have made. If you wish to remove the style sheet, you
must do so manually, using the Dreamweaver CSS Styles panel or Code View.
WARNING: Using the Remove Menu Magic II command will erase the entire menu—and its contents.
FIGURE 62
-Click Remove in the Remove Menu Magic II by PVII window to remove the menu.
That’s it—the menu and all its components are now removed from the page.
Section V – Images
When you insert a Menu Magic II navigation system on your page, the associated graphic
files are placed in a folder called m2img in your site root. The editable Fireworks .PNG
file is placed in a Local_Files/Fireworks folder. Menu Magic II creates and manages
these folders for you.
The graphics can be edited in Fireworks by opening the relevant .PNG file, making your
changes, and then exporting the modified graphics to the m2img folder for use on your
pages. When you export the images, the original images stored in the m2img folder will
be overwritten and your edited images will appear on any web pages that contain the rele-
vant Menu Magic II Type/Style menu.
We’ll cover the export process in detail later on in this Image Guide.
While a complete Fireworks User Guide is beyond the scope of this tutorial, we’ve pro-
vided an overview of modifying the graphics used in the Menu Magic II kit to help you
familiarize with some features of Fireworks as well as to assist you in editing the graphics
for use in any site you may be developing.
Note: These Fireworks images are placed in your local site folder when you use the Menu Magic II interface to insert the
particular menu that relates to the image(s).
-Open Fireworks
We’ll be using a copy of horizontal_basic.png for these examples. As the name implies,
this is the .png file used when the Horizontal Tab Bar Menu Type and the Basic Style
Theme options are selected.
FIREWORKS LAYERS
There are two layers within the .png file: Web Layer and Layer 1. Layer 1 holds the
graphical elements and the text. Web Layer holds the slices. Slices are the segments of the
file that will be exported as graphics. The slices overlay the graphical elements. To view
the Web Layer, click the small plus sign (+) at the left of the layer name to expand that
layer.
There is a slice for each of the six buttons on the Web Layer. Each slice has been given a
unique name that will be used when the slices are exported.
FIREWORKS FRAMES
There are three frames in our .png file, each frame holding all of the graphical elements
for a different button state.
Frame 1 holds the default state images. Frame 2 holds the over state images, and frame 3
holds the down state images. The different frames can be accessed by selecting the Next
(Previous) arrows at the bottom of the active window or, by selecting a new frame using
the Frame selector at bottom of Layers and Frames panel.
FIGURE 66 FRAME CHANGE BY SELECTING NEW FRAME AT BOTTOM OF LAYERS AND FRAMES PANEL
FIREWORKS SLICES
Slices stored on the Web Layer will generate an individual graphic for each of the three
Frames in the file. The slice names will determine the filenames of the three graphics pro-
duced by that slice. To distinguish between the graphics, the filenames will be amended to
include an underscore and the button state used by Menu Magic II. Let’s check the file-
name settings and make sure the correct ones are being used.
-Choose Files→HTML Setup from Fireworks’ main menu.
The HTML Setup window will open.
SLICE OPTIMIZATION
You can check (or set) the optimization for any image by selecting its slice and inspecting
the Optimization panel.
-On the Layers panel, click the plus (+) sign next to Web Layer to expand it
-Select hbscb6 in the Web Layer
You can see that Button 6 has been optimized for Index Transparency with the white
background color of the canvas being set to transparent. Button 6 is typical of the other
buttons in the file.
-On the Layers panel, click the minus (-) sign next to Web Layer to collapse it (we will
not be making changes to the slices at this time).
Now that we’ve covered the basics of the .png file, let’s move on to customizing the text
and graphics.
-Use the Pointer tool to select the text Button 1 on the first button.
FIGURE 72 BUTTON 1’S TEXT IS SELECTED AND ITS OBJECT IS HIGHLIGHTED IN THE LAYERS PANEL
With the text selected, the text object is highlighted in the Layers and Frames panel and
attributes of the text are displayed in the Property Inspector.
Attributes we’ve used on the sample button text are depicted in the above graphic. Other
attributes/properties have been left at default settings. You are able to change any attrib-
utes you’d like to customize the text to your preference.
Changes made in the Property Inspector will be reflected on the selected Button 1 text.
Remember – Frames are independent of one another. Changes made on Frame 1 will not affect the other two frames.
We’ll visit those frames to make changes (if any) after Frame 1 has been completed.
We’ve changed the text color to #333333 by clicking the color box and selecting #333333
from the leftmost column of color chips.
-With Button 1 text still selected, press Ctrl+C (Edit→Copy) to copy it.
-Multi-select the remaining button labels by holding the Shift key while selecting them.
FIGURE 75 MULTI-SELECT
-Choose Edit→Paste Attributes to assign all of the attributes from the Button 1 text ob-
ject to the other five buttons.
Depending on the width of the edited text, it may be necessary to realign things so the text
remains centered on the button. Using the Subselection tool from the Tool Bar, we can
Shift-select (multi-select) both the text and the button graphic to align those two elements
relative to one another.
We’ve used the Subselection tool instead of the Pointer tool because the button graphic is “grouped” together with other
graphical elements that create the complete button. We want the alignment to match up with the colored background area
of the button, the Subselection tool allows us to pick out that one element without changing other graphical components of
the button.
Repeat the above steps to Modify the Text Lettering for each of the button labels.
While each Frame is independent, it is important to remember that each frame must be checked for consistency… espe-
cially on button labels.
FIGURE 83 MODIFY→UNGROUP
With the graphics ungrouped, we can see the button consists of four objects in addition to
the text we modified earlier (dimensions in parentheses):
1. Larger rectangle (W100 H20)
2. Horizontal line (W113 H1)
3. Smaller rectangle (W3 H6)
4. Small circle (W3 H3)
Frame 3 buttons have one additional object: a small rectangle that covers a portion of the
line providing the illusion that the button is part of the page itself. In the following dia-
gram, this rectangle’s white fill color has been changed to emphasize the positioning.
Any or all of the individual objects can be modified to suit personal preferences or to
compliment colors being used on your web site. In addition to a fill color being applied on
the larger rectangle, the rectangle outline is accomplished via effects rather than a stroke
color. The Property Inspector identifies attributes and effects applied.
The rectangle’s fill color is changed in the same way we changed the font color earlier
(Figure 5-13). Select the rectangle and click the color box to open the color table. Choose
a new color from the color table.
Effects used on the object can be reviewed or modified by accessing information for that
effect. Information is displayed by clicking the small information icon (blue circle) to the
left of the effect name on the Property Inspector.
Angle 270º
FIGURE 89 EFFECT INFORMATION PANEL DISPLAYED
The three effects applied on the rectangle use Inner Shadow to create an outline on three
sides of the rectangle. Which side the outline appears on is determined by the angle used.
Since we are dealing with a rectangle, the angles are increments of 90 degrees. These are
the angles you’ll find by inspecting each of the three effects: 270º, 360º, and 180º.
Remember, each of the three frames is independent from each of the others. Changes made on one frame will not affect
the others. You can use the frame select arrows at bottom of active window (Figure 5-3) to review changes made to your
buttons and preview the button states.
DECREASING DIMENSIONS
The diagram below illustrates the larger rectangle selected. The width has been changed
from 100 pixels to 80 pixels by replacing the number 100 with 80 in the Property Inspec-
tor W (width) field.
Note:
The new width is typed into the field labeled W. Pressing the Enter
key after making the change will assure the new setting sticks
We’ve not seen a problem with FWMX sticking with changes however;
there have been instances with FW4 of the changes not sticking
unless the Enter key had been pressed following the change.
Since we are reducing the rectangle’s width by 20 pixels, we need to make a like reduction to the width of the line beneath
it. We also need to reposition the little circle 20 pixels left to maintain the relative proportions of the original buttons.
To change the line’s width, select it and change its W value in the Property Inspector W
to 93. The small circle would then need to be repositioned 20 pixels to the left (by reduc-
ing the X coordinate by 20).
Tip: If a button (or a text label) seems to jump as you change frames, then you have an alignment adjustment to make.
INCREASING DIMENSIONS
When you increase a button’s width, you also need to reposition any objects to the right—
in order to provide room for the expanded button. For this example, we’ll change the text
(button label) of the second button to read: Section 2 is here, then adjust the button ele-
ments to suit the longer label.
To make room for the expansion, we’ll first increase the canvas width.
-Choose Modify→Canvas→Canvas Size
FIGURE 93
Note: Using the upper-left Anchor position will anchor existing objects to the top left corner of the canvas and expand the
canvas to the right and down depending on the New Size values you enter.
-Shift-select all objects (elements) to the right of the button that will be widened. The ob-
jects can be selected directly on the canvas or in the Layers panel.
FIGURE 95 SHIFT-SELECT ALL OBJECTS TO THE RIGHT OF THE BUTTON THAT WILL BE MADE WIDER
-On your keyboard, hold down the Shift key as you press the Right Arrow key four times
to move the selected objects 40 pixels to the right.
From this point, we will employ steps similar to the steps taken earlier for reducing a but-
ton’s width.
-Select the small circle at the right edge of the line beneath the second button
-Hold down your Shift key while pressing your right arrow key four times to move the
circle 40 pixels to the right
-Select the horizontal line below the button and increase its width setting in the Property
Inspector W field by 40 pixels (from 113 to 153)
-Select the main button rectangle and use the Property Inspector to increase its width
from 100 to 140 pixels
-Multi-select (Shift+Select using Pointer tool) the main button rectangle and its text label.
-Choose Modify→Align→Center Vertical
Note: The techniques employed in this section can be used to increase the size of any of the other buttons.
Don’t forget to make a similar edit to the second button on Frames 2 & 3. On Frame 3, be
sure to adjust the small rectangle that covers the button’s bottom portion (See figure 85) as
needed.
Review the modified graphics using the Previous/Next arrows at the bottom of the active
window to make sure everything is aligned properly. Again—make sure there is no unex-
pected button jumping as you move from frame-to-frame.
EDITING SLICES
Earlier in this section (See figure 64), we briefly referenced the Web Layer, which stores
the document’s slices. Slices are used to define the areas of a Fireworks document to be
exported as web images (JPGs or GIFs). If the .PNG document does not contain slices, the
entire document is exported as a single image. Horizontal_basic_tutorial.png has one slice
for each of the six buttons. The same slice serves to define one image for each frame.
Slices can be viewed by selecting Show slices and hotspots on the Tool bar.
If no changes have been made to the button dimensions, each slice will be positioned di-
rectly over a button and would not need to be repositioned. If the button dimensions have
changed (even one!), the slices would need to be modified to reflect the change.
Editing Slices | 76
77 | Section V – Images
If the buttons (or any graphic that is overlaid with a slice) have been resized, the slices
will need to be adjusted before exporting.
FIGURE 100 ONE SLICE NEEDS TO BE RESIZED AND SEVERAL OTHERS NEED TO BE REPOSITIONED
The red (default color) lines visible in Slice View are Slice Guide Lines. These lines can
be dragged for positioning. Position your cursor over the line until the cursor changes to
be arrows showing the direction of movement available for that Slice Guide line.
Drag the line to the new position. We’ve increased the view to 200% (press Ctrl and the
plus (+) sign on your Numeric keypad) to aid in more precise positioning.
Repeat this procedure for each of the remaining lines that need to be repositioned.
77 | Editing Slices
Section V – Images | 78
As an alternative to dragging the Slice Guide lines, the slices can be resized using the
Property Inspector. Select the slice to be modified using the Pointer tool and enter new
figures into the W (width) or H (height) fields, as needed, in the Property Inspector. The
X (horizontal) field identifies the number of pixels from the left canvas edge the slice be-
gins.
Note: Slices are on the Web Layer, which overlays the entire document—no matter which frame you happen to be view-
ing at a given point in time. When you turn on Slices, they are locked on top of the canvas. As you switch frames, the
frames are switching, but the Slices remain fixed and static. When you are in slice-editing mode, you can switch between
frames to make sure everything is aligning properly. The Slice you edit on frame 3 is the same Slice that occupies the
same space on frames 1 and 2.
Editing Slices | 78
79 | Section V – Images
OPTIMIZING GRAPHICS
If the colors have been changed on one or more elements in the document, it may be nec-
essary to refresh or change the optimization settings on your slices. These settings affect
how the images that Fireworks exports will look on your web page.
-Open the Optimize panel
-Select one of your button slices
-Click on the Rebuild button located on the Optimize panel
Optimization should be tested for all three frames—especially if different frames have
different backgrounds. Here’s how to test:
-Select the Preview tab at the top of the active window
-Select each button slice (using Pointer tool) on the frame and inspect its settings in the
Optimize panel
-Use the Previous/Next arrows at the bottom of the active window to change frames, test-
ing each slice on each frame for consistency
79 | Optimizing Graphics
Section V – Images | 80
EXPORTING GRAPHICS
In order to get web images into your web site (and thus into your web pages), you need to
export them. We’re going to aim the exported web images at the m2img folder created in
your site’s root by Menu Magic II.
-Select File→Export
-Browse to the m2img folder and make sure it is the folder that appears in the Save in box
atop the Export window
The m2img folder was created and populated with the original images from this Fire-
works document by Menu Magic II. It is okay to overwrite the existing files.
Should you use Menu Magic II to create a Horizontal Tab Bar/Basic menu, in your current Dreamweaver site, your new
edited images will not be overwritten. However, if you create a Horizontal Tab Bar/Basic Menu in another Dreamweaver
site, the original Menu Magic II images will be used.
Note: The .png file should be saved after exporting since the Design Notes (part of the .png file) have been updated with
export path data when the graphics were exported.
Exporting Graphics | 80
81 | Section V – Images
FIGURE 108 MODIFY MENUMAGIC II WILL RECOGNIZE CHANGES TO GRAPHICS AND APPLY TO PAGE
Note: If, after following this tutorial, you’d like to revert your menu images back to the original ones, close the file you are
working on, open Local_Files/Fireworks/horizontal_basic.png and export its images to your m2img folder. That’s why
you created a copy of the original PNG and named it horizontal_basic_tutorial.png to work through our tutorials ☺
DELETING A SLICE
-Switch to Fireworks and Open horizontal_basic_tutorial.png
-Turn on View Slices (See figure 98)
-Select the slice to be removed using the Pointer tool (See figure 71) and press the Delete
button on your keyboard
Note: Deleting the slice will not remove graphics that have already been exported, but it will prevent the underlying
graphic from being exported.
Tip: The graphical elements that comprise the button can be left in your .png file in the event you may need them in the
future. If you do need them, simply create a new slice for it.
Tip: You can use horizontal_basic_tutorial.png if you’d like, but your images will not match our screen captures.
-Use the Pointer tool to draw a selection box around all of the objects on the canvas
Note: You can also use the Layers panel to Shift-Select all the objects if you’d prefer.
-With all objects selected, press Ctrl+C to Copy them to the clipboard
-Immediately Press Ctrl+V to Paste them on top of the originals—but DO NOT move
your cursor yet!
Tip: For Menu Magic II Theme sets that employ background images, make sure you copy the background elements, as
well—because the buttons are designed to precisely line up with the background.
Repeat the above steps to duplicate and position new buttons on each of the remaining
two frames.
Tip: Frames can be changed by using the Previous/Next arrows at bottom of active window or by selecting Frames tab in
Layers and Frames panel and selecting a new frame — or by clicking onto the Frame selector button at bottom of Layers
and Frames panel.
Repeat these steps (selecting, naming) for the remaining slices, incrementing the number
at the end of the name sequentially for each slice:
hbscb8, hbscb9, hbscb10, etc.
Alternately, you can double-click the object name in the Layers panel to open a field for
naming the slice.
Deactivate Slice View by clicking onto the Hide slices and hotspots icon in the Tool Bar
after each of the slices has been named.
You’re now ready to modify the text labels on the buttons as described in Changing the
Text Label earlier in this section.
Using Copy and Paste also ensured that each new slice retained the Optimization settings
of the originals.
Section VI – CSS
CSS is used to style the menus that are built on your page. Once Menu Magic II creates
the style sheet(s) for you, you can edit them as you see fit. Menu Magic II will not over-
write existing style sheets.
To edit any of the style sheets, you can use Dreamweaver MX’s built-in CSS Editor with full confidence. If you have
Dreamweaver 4, we highly recommend using a third-party CSS Editor.
.P7TBSUB
The .p7tbsub class is applied to all submenu DIVs (Layers).
.p7tbsub {background-color: #FFFFFF; layer-background-color: #FFFFFF; border: .1px
solid #FFFFFF;font-family: Arial, Helvetica, sans-serif;font-size: 12px;}
background-color: Sets submenu Layer background color. Default is white (#FFFFFF)
layer-background-color: Sets submenu Layer background color for Netscape 4. This is a NN4 proprie-
tary property that is necessary if you wish to support that browser.
border: We need to declare a token border width (in this case 1/10th pixel) in order for Netscape 4 to
render the Layer correctly. Edit this rule if you wish to have actual borders around your submenus. For
example, 1px solid #000000 will render a 1-pixel wide black border.
font-family: Set the type face for all text within the submenu layers.
font-size: Set the type size for all text within the submenu layers.
.P7TBSUB P
This tag selector affects all paragraphs within all submenu DIVs
.p7tbsub p {margin: 0px; padding: 6px 12px 12px 0px;}
margin: Sets the margin on all 4 sides of each paragraph to zero. We suggest you leave this property
alone unless you are an advanced CSS author.
padding: This property sets offset for all 4 sides of each paragraph in the submenu. It is written in CSS
shorthand. The 4 values represent the 4 sides of the paragraph in clockwise order from top to left: Top,
Right, Bottom, Left. These values provide some offset in a horizontal tab bar menu so that when users
move their mouse off of a text link, there is some room before the menu is hidden.
.P7TBSUB A:LINK
The default link color for all links inside the submenu DIVs
.p7tbsub a:link {color: #000000;}
The default link color is set to black (#000000)
.P7TBSUB A:VISITED
The visited link color for all links inside the submenu DIVs
.p7tbsub a:visited {color: #666666;}
The visited link color is set to dark gray (#666666)
.P7TBSUB A:HOVER
The hovered link color for all links inside the submenu DIVs
.p7tbsub a:hover {color: #FF9900;}
The visited link color is set to dark orange (#FF9900)
.P7TBSUB A:ACTIVE
The active link color for all links inside the submenu DIVs
.p7tbsub a:active {color: #FF9900;}
The visited link color is set to dark orange (#FF9900)
.P7TBDN
The down state link
{color: #FF9900 !important; font-weight: bold;}
This rule styles the down state link you optionally select. It’s set to the same color as the hover/active link
(dark orange) and is set to a bold weight to help it stand out. The !important attribute instructs modern
browsers to give the color property more specificity—that is, it will override potentially conflicting styles.
Important: While you can edit these rules as you wish, do not change their names!
Let’s review—
The rule names are identical to the embedded style sheet, with these exceptions:
@import url("d_bonusv5.css");
body {
background-image: url(m2img/dbn_pbg.jpg);
/* Note: Make URL Absolute for Navigator 4 compatibility*/
background-repeat: repeat-x;
background-color: #FFFFFF;
}
.p7tbsub a:hover {
color: #6666CC;
background-color: #EEEEEE;
}
.p7tbsub a:active {
color: #6666CC;
background-color: #EEEEEE;
}
Let’s review these rules in a little more detail—
BODY
background-image: url(m2img/dbn_pbg.jpg);
/* Note: Make URL Absolute for Navigator 4 compatibility*/
background-repeat: repeat-x;
background-color: #FFFFFF;
The Bonus Themes all have background images that serve to tie together the interface elements.
background-image: url(m2img/dbn_pbg.jpg): Sets the page background image. The comment below
it is a reminder to change the URL from a document relative path (msimg/dbn_pgb.jpg) to an absolute
path (http://www.yoursite.com/ msimg/dbn_pgb.jpg) before uploading the CSS file to your server. Why?
Because Netscape 4 reads paths within external style sheets as relative to the page that CSS file is
linked to, rather than relative to the CSS file.
background-repeat: repeat-x: Instructs the browser to place the image at the top left corner of the
screen and to tile it from left to right only. So, a background image that is 60 pixels wide by 100 pixels
high, will repeat every 60 pixels left-to-right, but will not repeat top-to-bottom. The result would be a 100
pixel-high band that stretches across the entire width of the page.
background-color: Sets the page background color. In the presence of our x-tiling background image,
the color would fill in all parts of the window not covered by the image.
@IMPORT
url("d_bonusv5.css");
This directive instructs modern browsers (version 5 and higher) to import a special style sheet
(d_bonusv5.css) that contains more advanced styles that would cause problems in older browsers. Older
browsers completely ignore the directive and read only the main linked style sheet. When importing a
style sheet from within another style sheet, the @import directive must always come first.
Let’s see what’s inside the Imported Style Sheet:
.p7tbsub {
font-size: 80% !important;
border-top: 0px !important;
}
.p7tbsub p {
padding: 0 !important;
}
.p7tbsub a {
background-color: #FFFFFF;
display: block;
padding: 2px 6px 2px 20px;
text-decoration: none !important;
width: 100%; /*IE 5 PC reads this*/
voice-family: "\"}\"";
voice-family: inherit;
width:122px; /*IE5Mac IE6 Mozilla Opera read this*/
}
Now let’s review the rules—
.p7tbsub
font-size: 80% !important;
border-top: 0px !important;
font-size: For version 5 and higher browsers, we set font size to a relative value (80%), which enables
users to easily resize text in their browsers. Because the linked style sheet sets a fixed size (12px), we
need to use !important to override it. Why? Because the imported style sheet comes before the rules in
the linked style sheet. Browsers read rules from top to bottom and competing rules that come later are
always given precedence—unless we use the !important attribute.
border-top: The linked style sheet describes a 1px gray border on all four sides of our submenus. Net-
scape 4 only supports 4-sided borders. Version 5 browsers are capable of rendering borders on a side-
by-side basis. By eliminating the top border of our submenu, we can make it abut to the bottom of our
image buttons in a much more finished-looking way. Preview a page that uses a Dropdown menu with
the Bonus Theme in Netscape 4 and in a newer browser to see the difference. Again, we use !important
to make sure it overrides the 4-sided border set in the linked sheet. We are turning off just the top border
(setting it to 0px), the other three sides are being handled by the rule in the linked sheet.
.p7tbsub p
padding: 0 !important;
padding: We need to set padding to zero because the offsets between the submenu links in version 5
browsers will be handled by the link style (p7tbsub a). We use !important to give precedence to this
value.
.p7tbsub a
background-color: #FFFFFF;
display: block;
padding: 2px 6px 2px 20px;
text-decoration: none !important;
width: 100%; /*IE 5 PC reads this*/
voice-family: "\"}\"";
voice-family: inherit;
width:122px; /*IE5Mac IE6 Mozilla Opera read this*/
background-color: Sets the background color of the <a> tag (the actual text links).
display: Sets the <a> tag to a block. That means, the links span the entire width of the submenu Layer
and the entire width is “clickable”. This makes our links appear and behave more like images than text.
padding: Creates offset on all four sides of each link. The CSS shorthand values start with Top and pro-
ceed clockwise to Left (Top, Right, Bottom, Left).
Note: the first 3 properties in this rule do not require !important because they have no like counterparts in the linked style
sheet to override.
text-decoration: Since the linked style sheet sets links to be underlined (text-decoration: underline), and
we want version 5 browsers to not underline links, we need to override it by resetting the value to none
and marking it !important.
width: IE5 on the PC needs the <a> tag width set to 100% in order for the entire width of the link to be
clickable. If IE5 were allowed to read the second width value (width: 122px), it would subtract the left and
right padding values (6px + 20px) from the width and the link would be shortened to 96px wide. A setting
of 100%, causes IE5 to use the entire width of the Layer (which is set to 148px directly on its <div> tag).
voice family: This is a hack that hides the second width property that comes below it, from IE5-PC. IE6,
as well as IE5-Mac, Opera, and Mozilla (Netscape 6 and 7) read the second width and, because it
comes later, it overrides the first width value. These modern browsers add padding to an element’s box
width. So, if we set the <a> tag to 122px wide, then add its left and right padding (6px + 20px), we come
up with 148px—which is precisely the width of our submenu Layers.
Important! When you need to edit the width of your submenus, remember to set both width values: the one before the
Voice Family hack and the one after it.
Note: to read more about this hack and about the IE5 box model bug it fixes, visit the hack’s author,
Tantek, at: http://www.tantek.com/CSS/Examples/boxmodelhack.html
DOCTYPES
The first line of every new document you create with Dreamweaver MX contains the
DOCTYPE1 (Document Type). Browsers use the doctype to determine how strictly to in-
terpret certain parts of the code. This is especially important for pages that contain
JavaScript and/or CSS. For some reason, Macromedia chose not to include a full doctype.
A DOCTYPE that includes a full URL (a complete web address) tells modern browsers to
render your page in standards–compliant mode thus treating your HTML, CSS, and
JavaScript in a predictable way.
By default, Dreamweaver MX inserts2 an incomplete DOCTYPE (no URL), which puts
modern browsers into Quirks mode. The browser will attempt to analyze your page in a
backwards-compatible way—rendering CSS and HTML as if for an older browser. Obvi-
ously, this is not a good thing.
Note: The work pages we’ve provided include a full DOCTYPE.
It would be good if we could store our new DOCTYPE inside Dreamweaver so it could be
easily accessed whenever needed. Dreamweaver MX has a feature called “Snippets” that
is tailor-made for this task.
Copy the text below:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
Note: Dreamweaver 4 does not have a built-in Snippets feature. Dreamweaver 4 users will need to copy and paste the
DOCTYPE manually.
1
Doctype is short for Document Type, which in turn is short for: Document Type Declaration (DTD). We are using an HTML 4.01 Tran-
sitional Doctype. The “Transitional” part means that certain tag properties are allowed in order to achieve compatibility with older (ver-
sion 4 ) browsers. You can copy the Doctype from within Acrobat Reader by clicking the “T” icon on Acrobat’s toolbar. If the icon is
not present, select Window→Toolbars→Basic Tools (Acrobat 5 or higher).
2
If you set up a Server Model (Cold Fusion, ASP, etc) in your Site Definition, Dreamweaver will not enter any Doctype at all.
97 | Doctypes
Section VI – CSS | 98
CREATING A SNIPPET
-Open the Snippets panel (Shift + F9) or click the Snippets tab on your Files panel group.
Click the New Folder icon on the panel’s lower right border. It’s the first icon in the row
and resembles a file folder.
FIGURE 117
Note: We want the new folder to be in the root of your Snippets directory. Make sure that no folder in the Snippets panel is
selected (highlighted). If one of the folders is highlighted (even if the highlight appears grayed out), click the Name Title
Bar above the folders list in the Snippets panel twice to deselect the folder before creating a new folder.
-A new untitled folder will appear. Overwrite the word untitled with doctypes.
Doctypes | 98
99 | Section VI – CSS
-With the doctype folder selected (highlighted), click the New Snippet icon (it’s the one
next to the New Folder icon) on the bottom right border of the panel.
-The Snippet window will open.
-In the Name box, type: 401 Transitional
-In the Description Box, type: Complete 4.01 transitional doctype
-For Snippet Type, enable (click) the Insert Block radio button
-Paste your copied doctype into the Insert Code box
Mac OSX users will have to type the Snippet code, as Dreamweaver for OSX seems not to have support for pasting in the
Snippets dialog.
FIGURE 119
-Click OK
99 | Doctypes
Section VI – CSS | 100
INSERTING A SNIPPET
Now that we’ve created our Snippet, let’s learn how to add a code Snippet to our page.
-Create a new Dreamweaver HTML document.
-Switch to Code View by clicking the Code View icon on the main toolbar or by choosing
View→ Code.
You should see code similar to this:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
</body>
</html>
-Delete the existing Doctype, then position your cursor on the now-blank line at the very
top of the code window, just above the opening <html> tag1.
1
A Doctype must go at the top of the page as its purpose is to inform browsers how the page that follows should be interpreted.
Doctypes | 100
101 | Section VI – CSS
The code (doctype) will appear on the new line you created in your source code.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
</body>
</html>
101 | Doctypes
Section VI – CSS | 102
In this section, we’ll cover some advanced techniques that you might want to use in the
development of your Menu Magic II menu system.
NOTE: You can use any names that you like. Just make sure that you keep the quotation marks around the names.
-Select the Menu Type: Dropdown from the Menu Type selection list.
-Select dbnb1.gif
-Click OK.
NOTE: It is important that you select the default image for the button. Do not select the over or down state buttons.
-Select dbnb2.gif
-Click OK.
-Set Swap Option to Use Over as Down (you can choose whatever option you want)
-Set Link Separator to Paragraph <p> (you can choose whatever option you want)
FIGURE 129 LEFT AND TOP POSITIONS AND THE SUBMENU WIDTH
Make sure that the Use Default Button checkbox is checked if you would like a default
button for your page (we are using the first button as our Default).
-Select the first button in the Menu Images list and click Set Default Button.
NOTE: After you click Set Default Button, the text Default Button will appear in front of your image name. If you inadver-
tently select the wrong button, just click on the new button name and click Set Default Button again.
Click in the Persistent Submenu checkbox if you would like to have the submenu that
relates to the Default Button be persistent. This is not recommended for a dropdown
menu, as the submenu will probably obscure your page content.
Click in the Down State Text Link checkbox if you would like to have a submenu link
use a different CSS class if it is the selected link (we’re selecting this option). Menu
Magic II will use Sublink 1-2 as the default. You can change this after you insert the
menu by using the Set Menu Magic II Behavior.
Click in the Auto Submenu Width check box if you want the system to automatically set
the submenu width for the specified menu type. We’re not selecting this option. When
this box is checked, the Submenu Width box is disabled.
Click in the No Submenu (NavBar Only) check box if you want to use this menu as a
navigation bar only. That is, the menus will not have submenus. We’re not selecting this
option.
-Click OK.
Menu Magic II will now create your menu. If you look in the Site panel you will see that
Menu Magic II has created a folder called m2scripts, and inside of that folder it created a
JavaScript file named mm2scripts.js, which was linked to your page.
Note: The m2scripts folder and the mm2scripts.js file were actually created the first time you inserted a Menu Magic II
menu on any page within your current Dreamweaver site.
If you look at the page in Code View, you will see that Menu Magic II also added the de-
fault CSS styles for your submenu.
<style type="text/css">
<!--
.p7tbsub {background-color: #FFFFFF; border: .1px solid #FFFFFF; font-size: 12px;
font-family: Arial, Helvetica, sans-serif; layer-background-color: #FFFFFF;}
.p7tbsub p {margin: 0px; padding: 6px 12px 12px 0px;}
.p7tbsub a:link {color: #000000;}
.p7tbsub a:visited {color: #666666;}
.p7tbsub a:hover {color: #FF9900;}
.p7tbsub a:active {color: #FF9900;}
.p7tbdn {color: #FF9900 !important; font-weight: bold;}
-->
</style>
Note: When you choose a Theme, Menu Magic II writes external CSS files and links them to your page.
OVERVIEW
The Menu Magic II Extension Kit by PVII is a powerful Dreamweaver tool that enables
you to quickly build and manage a variety of appealing DHTML menus in seconds. Sim-
ply select one of the pre-defined menu types, choose one of the built-in Themes or point to
your own button images... Menu Magic II does the rest!
The Menu Magic II system includes these commands and behaviors to allow you to con-
trol every aspect of the menu system:
113 | Overview
Appendix I – Menu Magic II Help System | 114
Overview | 114
115 | Appendix I – Menu Magic II Help System
THEMES
A very powerful feature of Menu Magic II is its ability to produce fully styled, profes-
sionally designed Theme Menus with just two clicks! Select a theme and the Menu Magic
II interface is automatically populated with images and option settings are perfectly set.
Just click OK and the menu is instantly built on your page. Of course, you can always
build your menu manually by choosing each button image and setting the options your-
self.
Additional Menu Magic II ThemePaks are available and will add more themes to the list
for you to use.
OVERVIEW
The menu creation process is controlled by the Insert Menu Magic II interface.
Choose Insert→Studio VII→MenuMagic II by PVII
The interface will open and you can choose a professionally designed Theme or you can
build a custom menu by selecting your own button images.
Note: If you already have an existing Menu Magic II menu on the page, it will be detected and Menu Magic II will auto-
matically switch you to the Modify interface.
To begin building your menu, the first choice to make is the Menu Type:
1. Horizontal Tab Bar
2. Dropdown
3. Vertical Flyout
Menu Magic II can create any of these menu types and will automatically preset all of the
option settings appropriate for the Menu Type you selected. Next, you can choose a pre-
defined menu Theme and simply click OK to build the menu... or you can select your own
menu images and set any of the menu options to create your custom menu.
THE INTERFACE
The Insert Menu Magic II interface allows you to quickly and easily set all of the func-
tional parameters of the new menu. Simply browse to your images, or use the Style Theme
selector to choose a design, then set any additional options and click OK.
FIGURE 131
The interface is divided into two sections. The top section is where you add, delete and
reposition the menu buttons and where you select the actual button image for each menu
section. The bottom section allows you to set various options that control the menu's posi-
tion and behavior.
MENU IMAGES
The Menu Images box lists all of the defined menu buttons by showing the image path
and sizes (width and height) for each of the menu sections, preceded by the word "But-
ton:". When a section does not yet have a button image defined, you will see the hint
"Browse to select a Button Image...". As you add button images, the system will display
the size for each image and set positions accordingly. While most menu deployments look
best when all of the images are sized in relation to each other, this is not a requirement.
Feel free to experiment with different menu button sizes for some interesting effects.
The image you select should always be the default button image. The system will auto-
matically handle image preloading for rollover and down-state images based on the Swap
Option you select. The file names of your button images can be anything you like. How-
ever, you must follow a naming convention for the swap images. For example, if you
name your default button image mybutton.gif, then the image you want to appear when
users mouse over it would be: mybutton_over.gif and the image you would want to desig-
nate the down-state would be named: mybutton_down.gif.
This naming convention is also user-definable to allow easy configuration with the output
of your image editor. Review "Swap Image Naming Convention" for complete details on
this feature.
Note: You must use the Browse button to select images. The system will ignore anything that you type directly into the
Image Path box.
Note: The interface will warn you if you have not selected an image name for the new menu section, and will not allow you
to finish until you have either made a valid image selection or have deleted the menu section.
Up
Click on the menu button you wish to move in the Menu Images list. Click on the Up but-
ton at the top of the interface. With each click of the Up button, the menu section will
move up one position.
Down
Click on the menu button you wish to move in the Menu Images list. Click on the Down
button at the top of the interface. With each click of the Down button, the menu section
will move down one position.
2. Dropdown
This will produce a horizontal menu with each of the menu buttons aligned horizontally
across the page. The top edges of the menu buttons will be vertically aligned to each
other. The submenu for each menu section will be positioned at the left edge of the corre-
sponding menu button. Each submenu can be set to the same width as its corresponding
menu button by checking the Auto Submenu Width box, or an explicit width can be speci-
fied by entering a number in the Submenu Width box. The top edge of each submenu will
be aligned to the bottom edge of its corresponding menu button.
3. Vertical Flyout
This will produce a vertical menu with each of the menu buttons aligned vertically on the
page. The left edges of the menu buttons will be aligned to each other. The top edge of
each menu button will align to the bottom edge of the menu button above it. The submenu
for each menu section will be positioned at the right edge of its corresponding menu but-
ton. Each submenu can be the same width as its corresponding menu button by checking
the Auto Submenu Width box, or a custom width can be specified by entering a number in
the Submenu Width box. The top edge of each submenu will be aligned to the top edge of
its corresponding menu button with a 10px upward offset.
STYLE THEME
A very powerful feature of Menu Magic II is its ability to produce fully styled, profes-
sionally designed Theme Menus with just two clicks! Select a theme and the Menu Magic
II interface is automatically populated with images and option settings are perfectly set.
Just click OK and the menu is instantly built on your page. Of course, you can always
build your menu manually by choosing each button image and setting the options your-
self.
As you select a theme from the list, a preview image will display... giving you a good idea
of how the menu will look. All of the appropriate options will be set for you... specific to
the chosen theme. Be careful when overriding these options because they were set to co-
ordinate with the special nature of each menu (even to the extent that the menu will be
positioned correctly to align with a page background image in some cases). Menu Magic
comes with a default theme for each menu type and a special Bonus theme for each menu
type. Additional Menu Magic II ThemePaks are available and will add more themes to the
list for you to use.
When using a Theme, the system will automatically place all the button images, in each of
their three swap states, into a folder in your site's root: /m2images. If the folder does not
exist, Menu Magic II will create it for you. The corresponding style sheet(s) will be placed
into another folder (/m2styles) and linked to your page. Additionally, the editable Fire-
works source file (.png) for the images will be placed into a /Local_Files folder to allow
you to easily edit the menu images. In short... it's all done for you!
Menu Magic II will create all folders as necessary. These folders will only be created once... the first time they are needed.
None
Select None if you wish to build your menu manually. No Theme will be used. In this
mode, you must select each button image and set each of the options yourself. A prede-
fined minimal style sheet will be embedded on the page to allow you to further style the
submenu items.
Basic
This will produce a fully styled menu for each menu type. However, it will not carry
background images... and the styles are kept at a minimum. The images are designed for
quick and easy modification and lend themselves to a variety of page layouts. This is an
ideal choice if you'd like to build a menu system as a starting point from which to custom-
ize it.
Bonus Theme
These are full-scale PVII ThemePak themes that produce highly styled and engaging
menu systems... automatically and completely. All you need to do is click OK! Images
and style sheets are specifically designed for each theme and even contain matching back-
ground images.
SWAP OPTION
The Swap Option allows you to select the image swap behavior for the menu. The system
will automatically create the necessary onMouseOver and onMouseOut events for each
menu button to enable the desired image swapping. This setting can be easily modified
after the menu is built by using the setMenuMagic II Behavior.
None
Choose None if you do not want any button effects. The menu buttons will remain static,
with no effects on rollover, and any down-state settings are ignored. The scripts will not
preload any images.
Down Only
The down-state button images are used, if needed, to display the selected Default menu
button... which will swap to the normal image on rollover. The scripts will preload only
the down state (_down) images.
LINK SEPARATOR
The system will produce a submenu containing boilerplate text links in each of the sub-
menus. The Link Separator option allows you to define what appears in the space between
each of these text links. While you can select any of the separators for any menu type,
some of the choices make visual sense only for certain menu types. For example, a pipe |
only makes sense if the submenu is wide enough to properly display more than one text
link in per line, while a paragraph <p> separator makes sense if you want to keep each
text link on its own line.
Separators:
Pipe |
Dash -
Brackets [ ]
Paragraph <p>
Single Space
Double Space
DEFAULT BUTTON
You can select any button to display in its down state to provide a visual clue that the but-
ton relates to the current page. Once the menu is built, you can change this setting at any
time by using the setMenuMagic II Behavior. The Default button will always return to its
down state after a rollover. That is, the down image will be used instead of the normal im-
age. A Default button can also have a Persistent Submenu that will always display when
the menu is at rest. A default menu button is displayed as "Default Button" in the Menu
Images list.
PERSISTENT SUBMENU
Check this box if you want the submenu corresponding to the default menu button to al-
ways be visible when the menu is at rest. As the user moves over the other menu buttons,
the associated submenus will display. However, as soon as the user moves off the menu
entirely, the default submenu will continue to display. This option has no effect if a De-
fault Menu Button has not been set. Once the menu is built, you can change this setting at
any time by using the setMenuMagic II Behavior.
SUBMENU WIDTH
The Submenu Width box allows you to enter a pre-determined fixed width, in pixels, that
the system will use for all of the submenus. Use this option when you want to override the
automatic width features of the scripts (especially if you are using button images of vary-
ing width). This will guarantee that all of the submenus have identical widths. This box
will only be active if the Auto Submenu Width box is unchecked.
LEFT POSITION
You can position the menu anywhere on the page. The Left Position setting affects the
location of the left edge of the first menu button. The system will align the remaining
menu buttons correctly depending on the menu type selected. A meaningful default value
is supplied by the system for each menu type. If you are using a Theme, always accept the
value supplied since it is critical to properly align the menu buttons with the page back-
ground.
TOP POSITION
You can position the menu anywhere on the page. The Top Position setting affects the
location of the top edge of the first menu button. The system will align the remaining
menu buttons correctly depending on the menu type selected. A meaningful default value
is supplied by the system for each menu type. If you are using a Theme, always accept the
value supplied since it is critical to properly align the menu buttons with the page back-
ground.
OK
When you are done selecting the images and options (or a theme), click the OK button to
build the menu. The system will verify your option settings and either alert you to any
problems that need your attention or build the completed, fully functional menu on your
page. You can preview in a browser to operate the menu and check its functionality. To
make further changes, you will use the Modify Menu Magic II system.
CANCEL
Click the Cancel button to completely abort the current Insert Menu Magic II operation.
This will close the interface and no changes will be made to your page.
HELP
Click the Help button to open the associated Help File in your browser. This page can re-
main open for easy reference while you continue working with the Menu Magic II inter-
face.
OVERVIEW
Menu Magic II is designed to specifically protect all of the elements of your existing
menu and will not re-write any of the content that you have placed in the submenus. You
can safely make changes to existing menu sections without losing your work. Addition-
ally, the Modify mode will not affect the style sheet(s) or existing images. This allows you
to safely modify images and style sheet(s) and still use the Menu Magic II Modify system
to fine tune your menu.
The Modify system will completely re-write the modified menu code to you page, while
protecting your content. All of the menu elements will be assigned the proper id or name
in relation to their new position in the menu. This allows you to insert or move as many
menu sections as you like while assuring that the new positions in the menu correspond
with the name or id of the image or menu div. This approach keeps the source code and
naming system readable and meaningful.
User-entered modifications to existing menu image links will always be preserved. Any
modified Alt tags, onClick events, or Href strings will be properly carried through to the
rebuilt menu. The content of the submenus is never touched and is transferred (if neces-
sary) to the revised submenu so that all menus remain sequentially placed and ID 'd. A
unique feature of the Modify system is the ability to rename any boilerplate text links. If
the system encounters the unmodified text links, it will rewrite them to properly reflect the
modified submenu location. That is, Sublink 2.1 will become Sublink 3.1, if your modifi-
cations result in a new button being inserted between the first and second buttons.
When the Modify interface first opens, the system will identify the type of menu you have
on the page and will populate all of the interface options based on the existing menu.
THE INTERFACE
The Modify Menu Magic II interface allows you to quickly and easily change all of the
functional parameters of the existing menu using an interface that is very similar to the
Insert Menu Magic II interface.
FIGURE 132
The interface is divided into two sections. The top section allows you to add, delete and
reposition the menu buttons... and to select the actual button image for each menu section.
The bottom section allows you to set various options that control the menu's position and
behavior.
The interface is very similar to the Insert interface and most of the same options are avail-
able. This section will deal specifically with the modification-related issues of each inter-
face item. The Theme and the No SubMenu options are not available in the Modify sys-
tem in order to protect the content of the existing menu, its submenus, and the related
files.
For a detailed discussion on all of the entry boxes see: Insert Menu Magic II
MENU IMAGES
The Menu Images box lists all of the defined menu buttons. It displays the image path and
size (width and height) for each of the menu sections contained in the existing menu. The
order reflects the order in which they are placed in the existing menu. Additionally, all of
the existing menu sections contain the name of the button image that is being used in the
existing menu. For example, p7TBim20 denotes that this is the second (20) menu button
in the existing menu. Newly added buttons will not show this image name to allow you to
easily differentiate new buttons from existing buttons.
You can move any menu section to change the order of the menu buttons. Select the menu
section you wish to move and click the Up or Down button to move it to the desired loca-
tion.
Note: You must use the Browse button to select images, the system will ignore anything that you type directly into the
Image Path box.
Note: The interface will warn you if you have not selected an image name for the new menu section and will not allow you
to finish until you have made a valid image selection or you have deleted the menu section.
Up
Click on the menu button you wish to move in the Menu Images list. Click on the Up but-
ton at the top of the interface. With each click of the Up button, the menu section will
move up one position.
Down
Click on the menu button you wish to move in the Menu Images list. Click on the Down
button at the top of the interface. With each click of the Down button, the menu section
will move down one position.
Note: If you change the Menu Type of an existing menu, some of the other options will be changed automatically to as-
sure that a proper menu will be built.
2. Dropdown
This will produce a horizontal menu with each of the menu buttons aligned horizontally
across the page. The top edges of the menu buttons will be vertically aligned to each
other. The submenu for each menu section will be positioned at the left edge of the corre-
sponding menu button. Each submenu can be set to the same width as its corresponding
menu button by checking the Auto Submenu Width box, or an explicit width can be speci-
fied by entering a number in the Submenu Width box. The top edge of each submenu will
be aligned to the bottom edge of its corresponding menu button.
3. Vertical Flyout
This will produce a vertical menu with each of the menu buttons aligned vertically on the
page. The left edges of the menu buttons will be aligned to each other. The top edge of
each menu button will align to the bottom edge of the menu button above it. The submenu
for each menu section will be positioned at the right edge of its corresponding menu but-
ton. Each submenu can be the same width as its corresponding menu button by checking
the Auto Submenu Width box, or a custom width can be specified by entering a number in
the Submenu Width box. The top edge of each submenu will be aligned to the top edge of
its corresponding menu button with a 10px upward offset.
SWAP OPTION
You can change the button image swap functionality of the menu system at any time. The
modified menu will rebuild all of the event handlers to properly reflect the option you
choose.
None
Choose None if you do not want any button effects. The menu buttons will remain static,
with no effects on rollover, and any down-state settings are ignored. The scripts will not
preload any images.
Down Only
The down-state button images are used, if needed, to display the selected Default menu
button... which will swap to the normal image on rollover. The scripts will preload only
the down state (_down) images.
LINK SEPARATOR
The Link Separator option is disabled for any existing menu section in order to preserve
the contents of the submenu. This option will become active only for newly added menu
sections. The system will produce a submenu containing boilerplate text links in each of
the new submenus.
Note: The Link Separator option is global for all new menu sections. The selected separator will be used for all of the
newly added menu sections. The separator used in existing menu sections will not be changed, regardless of this setting.
DEFAULT BUTTON
You can select any button to display in its down state to provide a visual clue that the but-
ton relates to the current page. Once the menu is built, you can change this setting at any
time by using the setMenuMagic II Behavior. The Default button will always return to its
down state after a rollover. That is, the down image will be used instead of the normal im-
age. A Default button can also have a Persistent Submenu that will always display when
the menu is at rest. A default menu button is displayed as "Default Button" in the Menu
Images list.
PERSISTENT SUBMENU
Check this box if you want the submenu corresponding to the default menu button to al-
ways be visible when the menu is at rest. As the user moves over the other menu buttons,
the associated submenus will display. However, as soon as the user moves off the menu
entirely, the default submenu will continue to display. This option has no effect if a De-
fault Menu Button has not been set. Once the menu is built, you can change this setting at
any time by using the setMenuMagic II Behavior.
SUBMENU WIDTH
Switching from one type to another may have an effect on the submenu width. If you want
to preserve you current submenu width then be sure to un-check the Auto Submenu Width
box before changing the Menu Type. The width of the first submenu on the page will then
be supplied in the Submenu Width box.
You can also use this feature to quickly change the width of all your submenus by simply
entering the new width and clicking OK.
The Submenu Width box allows you to enter a pre-determined fixed width, in pixels, that
the system will use for all of the submenus. Use this option when you want to override the
automatic width features of the scripts (especially if you are using button images of vary-
ing width). This will guarantee that all of the submenus have identical widths. This box
will only be active if the Auto Submenu Width box is unchecked.
LEFT POSITION
You can position the menu anywhere on the page. The Left Position setting affects the
location of the left edge of the first menu button. The system will align the remaining
menu buttons correctly depending on the menu type selected. A meaningful default value
is supplied by the system for each menu type. If you are using a Theme, always accept the
value supplied since it is critical to properly align the menu buttons with the page back-
ground.
TOP POSITION
You can position the menu anywhere on the page. The Top Position setting affects the
location of the top edge of the first menu button. The system will align the remaining
menu buttons correctly depending on the menu type selected. A meaningful default value
is supplied by the system for each menu type. If you are using a Theme, always accept the
value supplied since it is critical to properly align the menu buttons with the page back-
ground.
OK
When your modifications are complete, click the OK button to rebuild the menu. The sys-
tem will verify your option settings and either alert you to any problems that need your
attention or rebuild the completed, fully functional menu on your page. You can preview
in a browser to operate the menu and check its functionality. To make further changes you
can use the Modify command again, as many times as you like.
If you are not happy with the changes, you can revert to your previous, un-modified menu
by choosing Edit-Undo P7cmEditMM2 in the Dreamweaver menu.
CANCEL
Click the Cancel button to completely abort the current Menu Magic II operation. This
will close the interface without making any changes to your page.
HELP
Click the Help button to open the associated Help File in your browser. This page can re-
main open for easy reference while you continue working with the Menu Magic II inter-
face.
Note: The Remove option will be unavailable (grayed out) in the menu if there are no components of the Menu Magic II
system on the page.
OVERVIEW
The Remove Menu Magic II command will be available if the system detects the presence
of the setMM2 behavior on the <body> tag, onLoad event, or if the page contains at least
one image that is using the Menu Magic II naming convention (an image name that starts
with p7TBim).
The system will look for, and remove, all of the elements on your page that follow the
Menu Magic II naming convention:
1. The MM2 Trigger Divs—All divs (layers) whose id (name) starts with p7Tbtrig
2. The MM2 Images—All images whose name (or id) starts with p7Tbim
3. The MM2 SubMenu Divs—All divs (layers) whose id (name) starts with p7TBsub
Additionally, the system will also remove these related components:
The system will not attempt to remove any linked or embedded style sheet in order to pro-
tect any modifications you may have made. If you wish to remove the style sheet you
must do so manually, using the Dreamweaver CSS Styles panel or Code View.
THE INTERFACE
The Remove Menu Magic II interface allows you to quickly remove all of the menu com-
ponents from your page.
REMOVE
Click the Remove button to completely remove the Menu Magic II elements from your
page. This will remove all of the elements that follow the Menu Magic II naming conven-
tion.
CANCEL
Click the Cancel button to abort the Remove Menu Magic II operation. This will close the
interface and no changes will be made to your page. Everything will remain as it was be-
fore you opened the Remove Menu Magic II interface.
HELP
Click the Help button to open the associated Help File in your browser. This page can re-
main open for easy reference while you continue working with the Menu Magic II inter-
face.
OVERVIEW
The Set Menu Magic II Behavior is used to initialize the Menu Magic II system on your
page and is placed on the page's <body> tag, onLoad event so that the behavior will run
when the page first loads. This behavior is required on all pages that use the Menu Magic
II menu system.
On its own, the Set Menu Magic II behavior does nothing to trigger the menu action; it
simply initializes the menu system so that the Trigger Menu Magic II events can function
properly.
Whenever you use a Set Menu Magic II event, be sure to also add a Trigger Menu Magic
II event to cause the menu to display in its desired state.
Use this behavior to control the Default Submenu Button and Down-State Link settings on
each individual Menu Magic II page. You can also control the image swap, down-state
class name and persistent submenu settings on an individual page-by-page basis allowing
for complete flexibility throughout the entire Menu Magic II system.
Advanced users can also use this behavior to create the Menu Magic II menu by selecting
the various options and applying the behavior to the <body> tag, onLoad event. While the
scripts will work with most existing elements on your page, you must follow these mini-
mum naming conventions in order for the menu to work properly:
1. Image Names: The page must contain one or more images using a name that starts
with p7Tbim
2. Submenu Names: The related submenu div (layer) must use a name that starts with
p7Tbsub
3. Menu Closer Div: This is a div (layer) that contains a small transparent .gif image
(shim.gif) that is sized to encompass an area greater than the overall area of the menu
and its submenus. The image contains an onMouseOver event to fire an empty Trigger
Menu Magic II event that will restore the menu to its default state whenever the user
moves off the menu components. The Menu Magic II scripts assume that this div is on
the page and will require that the name (id) is set to: P7TabH.
The image and submenu names are tied together by using exactly the same appendage.
For example, an image named p7TBim50 will correspond to a submenu named
p7TBsub50. Notice that 50 is the common appendage. This portion of the name can be
anything you like. For example, p7TBimButOne and p7TBsubButOne are acceptable...
but p7TBimButOne and p7TsubBut1 are not.
There is no requirement for a matching submenu to exist for each button image. In fact,
Menu Magic II will work perfectly without any submenus on the page. If the scripts find a
matching submenu, it will be used. If no match is found, the scripts will act on just the
menu button... just like a conventional image-only NavBar.
The image you select should always be the default button image. The system will auto-
matically handle image pre-loading for rollover and down-state images based on the Swap
Option you select. The file names of your button images can be anything your like. How-
ever, you must follow a naming convention for the swap images. For example, if you
name your default button image mybutton.gif, then the image you want to appear when
users mouse over it would be: mybutton_over.gif and the image you would want to desig-
nate the down-state would be named: mybutton_down.gif.
This naming convention is also user-definable to allow easy configuration with the output
of your image editor. Review "Swap Image Naming Convention" for complete details on
this feature.
THE INTERFACE
The Set Menu Magic II interface provides quick access to all of the Menu Magic II ini-
tialization controls to allow you to easily manage the menu settings on a page-by-page
basis.
FIGURE 133
None
Choose None if you do not want any button effects. The menu buttons will remain static,
with no effects on rollover, and any down-state settings are ignored. The scripts will not
preload any images.
Down Only
The down-state button images are used, if needed, to display the selected Default menu
button... which will swap to the normal image on rollover. The scripts will preload only
the down state (_down) images.
Note: If you do not select a custom class in the Down State Class Name this feature will have no effect.
Note: This setting will have no effect if you do not select a Down State Link.
OK
When you are satisfied with all of your settings, click the OK button to apply the behav-
ior.
CANCEL
Click the Cancel button to completely abort the current Menu Magic II operation. This
will close the interface and no changes will have been made to your page.
HELP
Click the Help button to open the associated Help File in your browser. This page can re-
main open for easy reference while you continue working with the Menu Magic II inter-
face.
OVERVIEW
The Trigger Menu Magic II behavior works in two modes:
1. AN EMPTY TRIGGER
When the behavior is used without any arguments (no image button name is referenced),
the scripts will place the menu into the configuration defined by the Set Menu Magic II
behavior: the menu's default state. This empty trigger must be used on the <body> tag's
onLoad event, right after the Set Menu Magic II behavior, in order to cause the menu to
actually switch into the desired default state when the page first loads. The empty trigger
is also used on the menu closer div (layer), P7TabH, to cause the menu to return to its de-
fault state when the user moves his mouse off the menu components.
The Trigger Menu Magic II behavior is used often on the page - once on each of the menu
button images. We have purposely made this trigger behavior as compact as possible to
gain efficiency and ease of use. You only need to apply a single instance of the behavior
to the onMouseOver (or onClick, if desired) event of a button image to trigger all of the
menu effects. You do not need to use an onMouseOut event on the button images since
this is handled automatically by the empty Trigger Menu Magic II behavior on the closer
div.
THE INTERFACE
The Trigger Menu Magic II interface allows you to quickly choose a button image name
to trigger... or select none to restore the menu back to its default state.
FIGURE 134
OK
When you have made your selection, click the OK button to apply the behavior.
CANCEL
Click the Cancel button to completely abort the current Menu Magic II operation.
HELP
Click the Help button to open the associated Help File in your browser. This page can re-
main open for easy reference while you continue working with the Menu Magic II inter-
face.
Note: Menu Closer Div -This is a div (layer) that contains a transparent .gif image (shim.gif) that is sized to encompass an
area greater than the overall area of the menu and all its submenus. The image contains an onMouseOver event to fire an
empty Trigger Menu Magic II event that will restore the menu to its default state whenever the user moves his mouse off
the menu components. The Menu Magic II scripts assume that this div is on the page and will require that the name (id) is
set to: P7TabH.
In Dreamweaver, open the page that contains the Menu Magic II JavaScript. This will be
the mm2script.js file in the m2scripts folder of your site. If the menu was created manu-
ally, the scripts will most likely be on the same page as the menu in the <script> portion
of the page's <head> region.
Locate the P7_setMM2() function, the first 4 lines will look like this:
function P7_setMM2(){ //v2.0 by PVII
//set the image over and down name convention
document.p7TabOver="_over";
document.p7TabDown="_down";
The third and fourth lines declare what the script will use as the naming convention. Sim-
ply replace the text "_over" with the naming convention you want to use for the over im-
age, then replace the text "_down" with the naming convention you want to use for the
down-state image. In our example, we are changing the convention to use _f2 and _f3... so
our edited code should look like this:
function P7_setMM2(){ //v2.0 by PVII
//set the image over and down name convention
document.p7TabOver="_f2";
document.p7TabDown="_f3";
Save the JavaScript file (or if the script was located on the same page as the menu, save
the page).
The Menu Magic II scripts will now automatically use _f2 and _f3 as the naming conven-
tion for the rollover and down images. The image filenames, using this convention, would
look like:
Default image: mybutton.gif
Rollover image: mybutton_f2.gif
Down state image: mybutton_f3.gif
You can use any convention you like, just be sure to always leave the quotation marks
around the convention name you use when editing the JavaScript file. For example, this
naming convention will also work fine:
document.p7TabOver="rollover";
document.p7TabDown="closed";
In this case, the image file names would look like this:
Default image: mybutton.gif
Rollover image: mybuttonrollover.gif
Down state image: mybuttonclosed.gif
As you can see, any naming convention will work, as long as you modify the two lines in
the Set Menu Magic JavaScript code.