Often it's convenient to split text and FML among multiple files. Forio Broadcast let's you do this with the Include directives. There several reasons why you might find this useful:
You might want to use the same HTML among multiple pages. For example, if you have a page header that appears on every page, it's better to put the HTML in just one file for easy updating.
You might want to create a single file that contains local references that are accessible to every page. This allows you to enter simulation settings that are used repeatedly throughout the simulation. (such as a list of menu headings, the color of a table header, or if you resell the simulation to other organizations, the name of your customer).
You might want to include special text that does not get checked for FML.
Below are descriptions of the different types of includes.
#IncludeVerbatim( "filename" )
Inserts all text in the given filename into the current document, with no parsing of FML. In other words, the text in the document is sent to the user exactly as is. You might to do this if you are displaying text that contains a lot of "#" or "$" symbols, as this is often interpreted as FML. If you are displaying your model to the user it's a good idea to use #IncludeVerbatim. This is because models often contain lines with double "#" symbols such as "M NumberFormat = ##,0". The double "#" symbol will be treated as an FML comment (hiding some of the text) unless you use #IncludeVerbatim.
Example:
#IncludeVerbatim ( "mymodel.txt" )
#IncludeParsed( "filename" )
Inserts all text in the given filename into the current document. Any FML in the specified file will be parsed and executed. Use this when you want to combine two files into one, such as when you are including a common header or common menu in every page.
Example:
#IncludeParsed ( "leftmenubar.htm" )
This example shows how to make create a menu in a common file and use it in one of multiple pages.
Example file: menu.txt
|
Welcome to the Incredible World of Simulation |
Example file: results.htm:
|
#IncludeParsed("menu.txt") |
Example output HTML for results.htm:
|
Welcome to the Incredible World of Simulation |