Using the CSV_Include Project > Using Pages and Templates > File Page Templates

File Page Templates

Use this template to create a page that can display text (.txt) or rich format text (.rtf) files.

To understand how a file page works, you need to distinguish between the file page and the file that is presented on the page; for the file page merely acts as a blank palette to a variety of files.

The file page is displayed whenever the function CSV_Nav_File is called. When executed, CSV_Nav_File determines the file that is to be displayed on the file page, its location, the title applied to the page, and whether or not the file is editable.

For example, you may configure a menu item that calls up the following:

?CSV_Nav_File(MyPageTitle,[Run]:\file.txt,2)

		

This would call up the file page, put the title "MyPageTitle" on the title bar, load the file called File.txt from the Run directory, and allow the file to be edited (with the last argument set to 2, the file can be saved).

The parameter [Navigation]FilePage determines the page that's used as the palette for this process. The preconfigured page CSV_File is the default. You can change the setting for Navigation[FilePage], however, you need to verify that any page you specify for this parameter is based on the CSV_File template, otherwise CSV_Nav_File will not be able to execute properly.