|
|||||||||
|
|||||||||
![]() |
![]() |
Documentation >> Outline of How-To Docs >> How-To Use The Enclosure MacroThe #enclosure MacroThe <!--#enclosure--> simple macro allows you to insert (or link to) a variety of enclosures for display in a message. To use it, first attach the file you wish to use to a message. You can then use the macro with this general syntax: <!--#enclosure filename="<name of enclosure>" msgNum="<message number that contains the enclosure>"--> Both the filename and msgNum parameters are optional. If you don't specify a message number, the current message will be assumed. Any additional parameters you include in the simple macro will be used to build the tag that the macro generates. So, for example, to use an image named "rock.jpg" you've enclosed in a message, you might use the macro like this: If you don't specify a filename, then the message's first attached file will be assumed. <!--#enclosure filename="rock.jpg" border="5"--> Conversant would convert the simple macro into the appropriate image tag: <IMG SRC="http://www.free-conversant.com/support/1/enclosure/rockthumb.jpg" HEIGHT="150" WIDTH="200" border="5"/> The image tag would, of course, cause the image to be displayed within your web page like so:
The macro will handle various content in different ways. Further details on the various kinds of files it can deal with follow:
Linking to EnclosuresIf you don't want the enclosure to be displayed in the HTML, but would rather just link to the file, you have three optional parameters at your disposal.
Here are examples:
Graphic FilesThe #enclosure simple macro recognized three kinds of graphic files: GIF, JPEG, and PNG. For each of these, Conversant automatically determines the appropriate height and width and adds those elements to the tag for quicker rendering.
Plain TextWhen rendering plain text files, the macro simply includes the content of the text file wrapped in <PRE> tags for correct display within an HTML page. For example, one might use the enclosure tag this way:<!--#enclosure filename="textsample.txt"--> resulting in the following:
Hi there! I'm a text file with three lines of text.
HTMLIncluding HTML files is a trickier business than including text files, as the pages into which you'll be inserting the HTML will already have an <HTML> tag, a <BODY> tag, etc. Therefore, when you insert an HTML file, by default only the information between the <BODY> and the </BODY> tags will be included. E.g.,<!--#enclosure filename="htmlsample.html"--> yields this: This is the HTML test file. If you have more advanced needs, you can also specify your own matching strings. For example, a Dreamweaver user might choose to ignore the templates that Dreamweaver applies to the pages like so: <!--#enclosure filename="htmlsample2.htm" startAfter="<!-- #BeginEditable "BODY" -->" endBefore="<!-- #EndEditable -->"--> (Note that special characters that are passed as parameters here should be entified.) The result of this would then be: Hi! I'm an HTML test file.
Other ContentAny data that isn't recognized as one of the previous data types will be included using the HTML EMBED tag. For example, to include a Quicktime movie, one might use the following:<!--#enclosure filename="sample.mov" width="200" height="256" autoplay="false"--> The resulting HTML would be something like this: <EMBED SRC="http://www.free-conversant.com/support/1/enclosure/Sample.mov" autoplay="false" height="256" width="200" /> Resulting in the display of the movie like so: (Quicktime plugin required to see the movie.) |
![]() |
||||||