MACROMEDIA DREAMWEAVER MX 2004-EXTENDING DREAMWEAVER Manual page 189

Extending dreamweaver
Hide thumbs Also See for DREAMWEAVER MX 2004-EXTENDING DREAMWEAVER:
Table of Contents

Advertisement

The name
getDynamicContent()
list of entries in the menu is fixed. For example, the Text_Size.htm file in the Configuration/
Menus/MM folder is not a dynamic menu; it is designed to be called from each one of a set of
static menu items. By adding a
possible font sizes, however, the same command file can also be used for a toolbar pop-up menu.
Toolbar items ignore underscores in the strings in a returned array so you can reuse menu
command files. In the menu command file, Dreamweaver ignores the
function because the menu item is not marked as dynamic.
Arguments
None.
Returns
Dreamweaver expects an array of strings with which to populate the menu.
Example
function getDynamicContent()
{
var items = new Array;
var filename = dw.getConfigurationPath() + "/Toolbars/MM/AddressList.xml";
var location = MMNotes.localURLToFilePath(filename);
if (DWfile.exists(location))
{
var addressData = DWfile.read(location);
var addressDOM = dw.getDocumentDOM(dw.getConfigurationPath() +
'/Shared/MM/Cache/empty.htm');
addressDOM.documentElement.outerHTML = addressData;
var addressNodes = addressDOM.getElementsByTagName("url");
if (addressNodes.length)
{
for (var i=0; i < addressNodes.length ; i++ )
{
items[i] = addressNodes[i].address + ";id='" +
addressNodes[i].address + "'";
}
}
}
return items;
is a misnomer because this function should be used even if the
getDynamicContent()
function that simply returns the list of
getDynamicContent()
The toolbar command API
189

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the DREAMWEAVER MX 2004-EXTENDING DREAMWEAVER and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Dreamweaver mx 2004

Table of Contents