kprice | 159fa58 | 2006-05-08 21:30:45 +0000 | [diff] [blame] | 1 | <?xml version="1.0" encoding="utf-8"?>
|
| 2 | <!--Arbortext, Inc., 1988-2005, v.4002-->
|
| 3 | <!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN"
|
| 4 | "..\dtd\task.dtd">
|
| 5 | <task id="tsrcedt022" xml:lang="en-us">
|
| 6 | <title>Editing snippet items</title>
|
| 7 | <prolog><metadata>
|
| 8 | <keywords><indexterm>snippets<indexterm>editing items</indexterm></indexterm>
|
| 9 | </keywords>
|
| 10 | </metadata></prolog>
|
| 11 | <taskbody>
|
| 12 | <context> To modify an existing item in a Snippets drawer, complete the steps
|
| 13 | listed below. If you have just completed the task <xref href="tsrcedt015.dita"
|
| 14 | type="task">Adding an item to a snippets drawer</xref> and the <wintitle>Customize
|
| 15 | Palette</wintitle> window is still open, you can skip steps 1 and 2.</context>
|
| 16 | <steps>
|
| 17 | <step><cmd>In the Snippets view, right-click the name of the item that you
|
| 18 | want to modify, and select <uicontrol>Customize</uicontrol>.</cmd></step>
|
| 19 | <step><cmd>Optionally, type a new name and a new description for the item.</cmd>
|
| 20 | </step>
|
| 21 | <step><cmd>To declare a variable, click <uicontrol>New</uicontrol> and type
|
| 22 | the variable's name, description, and default value.</cmd></step>
|
| 23 | <step><cmd>To edit an existing variable, type over the existing values.</cmd>
|
| 24 | </step>
|
| 25 | <step><cmd>To edit the <uicontrol>Template Pattern</uicontrol> field, type
|
| 26 | into the field, cut and paste into the field, or, if you have defined one
|
| 27 | or more variables, click the <uicontrol>Insert Variable Placeholder</uicontrol> button,
|
| 28 | and double-click the name of the variable that you want to insert.</cmd><stepxmp>For
|
| 29 | example, if you have declare variables named <varname>uri</varname> and <varname>prefix</varname>,
|
| 30 | clicking the button brings up a menu that contains those names. Double-clicking <varname>uri</varname> inserts <codeph>${uri}</codeph>,
|
| 31 | as in the following example:<codeblock><%@ taglib uri="${uri}" prefix="${prefix}" %></codeblock></stepxmp>
|
| 32 | <stepresult>Later, when you insert the snippet into a file, <codeph>${uri}</codeph> and <codeph>${prefix}</codeph> are
|
| 33 | each converted to the default value declared in the Variables table. Users
|
| 34 | can replace the default values in the <uicontrol>Insert Template:</uicontrol><varname>Item_name</varname> dialog
|
| 35 | at insertion time.</stepresult></step>
|
| 36 | <step><cmd>Click <uicontrol>OK</uicontrol>.</cmd></step>
|
| 37 | </steps>
|
| 38 | <result>The modified item will be added to the list of items in the appropriate
|
| 39 | drawer.</result>
|
| 40 | </taskbody>
|
| 41 | <related-links>
|
| 42 | <linkpool type="concept">
|
| 43 | <link href="csrcedt001.dita"><linktext>Snippets view</linktext></link>
|
| 44 | </linkpool>
|
| 45 | <linkpool type="task">
|
| 46 | <link href="tsrcedt026.dita"><linktext>Editing with snippets - overview</linktext>
|
| 47 | </link>
|
| 48 | <link href="tsrcedt014.dita"><linktext>Adding snippets drawers</linktext>
|
| 49 | </link>
|
| 50 | <link href="tsrcedt015.dita"><linktext>Adding items to snippets drawers</linktext>
|
| 51 | </link>
|
| 52 | <link href="tsrcedt016.dita"><linktext>Deleting or hiding snippet items or
|
| 53 | drawers</linktext></link>
|
| 54 | </linkpool>
|
| 55 | </related-links>
|
| 56 | </task>
|