4W WebMerge Tag Reference

WM-FieldInclude

Syntax
[WM-FieldInclude: fieldName]

Example
[WM-FieldInclude: Field001] 

Description
[WM-FieldInclude] uses a file path contained in the data from the field specified in fieldName to insert the contents of that file into your template.

This can greatly simplify your Web production workflow by allowing you to update content with WebMerge without altering your database.

For example, you could write a news article in any text editor and save it to a specific location, such as "/HardDrive/Folder/News.txt". Your field data then only needs to include the path to that file, and using the WM-FieldInclude tag that data will be copied in place of the tag as the page is generated.

If the included file is in HTML format and a <body> tag is present, only the HTML between the <body> and </body> tags is included in your generated page, to avoid possible conflicts with your template's <body> tag.

The file specified in in the field data is the full path to the local file in UNIX format, or a partial path relative to the location of the page being generated.

Files with names not ending in ".htm" or ".html" will be assumed to consist of plain text and will be translated into HTML, changing all non-ASCII characters to their corresponding character entity according to the ISO 8859-1 standard. For example, the character "<" becomes "&lt;". Files with names ending in ".htm" or ".html" will be included "as is", with no character translation.

Introduced in version 2.2.