444
Data Translators
Creating the icon
Next, you create the icon for Poco tags.
To create the icon:
1.
Create an image file that is 18 x 18 pixels for the Poco tags icon.
2.
Save the file as poco.gif in the Configuration/ThirdPartyTags folder.
Creating the attribute translator
You create an HTML file that contains the functions necessary for the attribute translator.
To create the HTML file:
1.
Create a new blank file.
2.
Enter the following:
<html>
<head>
<title>Conditional Translator</title>
<meta http-equiv="Content-Type" content="text/html; charset=">
<script language="JavaScript">
/*************************************************************
* This translator handles the following statement syntaxes: *
* <# if (condition) then foo else bar #> *
* <# if (condition) then att="foo" else att="bar" #> *
* <# if (condition) then att1="foo" att2="jinkies" *
* att3="jeepers" else att1="bar" att2="zoinks" #> *
* *
* It does not handle statements with no else clause. *
*************************************************************/
var count = 1;
function translateMarkup(docNameStr, siteRootStr, inStr){
var count = 1;
// Counter to ensure unique mmTranslatedValues
var outStr = inStr;
// String that will be manipulated
var spacer = "";
// String to manage space between encoded attributes
var start = inStr.indexOf('<# if'); // 1st instance of Pound Conditional
code
// Declared but not initalized. //
var attAndValue;
// Boolean indicating whether the attribute is part of
Содержание DREAMWEAVER 8-EXTENDING DREAMWEAVER
Страница 1: ...Extending Dreamweaver...
Страница 8: ...8 Contents...
Страница 14: ...14 Introduction...
Страница 16: ......
Страница 54: ...54 Customizing Dreamweaver...
Страница 96: ...96 Customizing Code View...
Страница 98: ......
Страница 110: ...110 Extending Dreamweaver...
Страница 138: ......
Страница 166: ...166 Insert Bar Objects...
Страница 180: ...180 Commands...
Страница 248: ...248 Toolbars...
Страница 260: ...260 Reports...
Страница 278: ...278 Tag Libraries and Editors...
Страница 288: ...288 Property Inspectors...
Страница 378: ...378 Server Behaviors...
Страница 398: ...398 Data Sources...
Страница 432: ...432 Server Models...
Страница 456: ...456 Data Translators...
Страница 482: ......
Страница 492: ...492 The Shared Folder...