Product Logo

CNS Menu

Dynamic Menus

Functions

CNSMenu_DefineFileMenu

NameCNSMenu_DefineFileMenu
Description

This function is similar to the CNSMenu_DefineXMLMenu function, except that instead of defining the actual XML text, you specify a file on the hard drive containing the XML text. The XML file you specify must be a “well-formed” XML document. Unlike the CNSMenu_DefineXMLMenu function, the XML file you specify must contain the root <CNSMenu> and </CNSMenu> tags.

Return TypeText
FormatCNSMenu_DefineFileMenu ( File )
Required Parameters
File

The Path and File Name of the XML File that Defines the Menu(s).

Examples
Example 1

Specifies the xml file with a Windows path.

CNSMenu_DefineMenuFile( "c:\xmldocs\my_menu.xml" )
Example 2

Specifies the xml file with a Mac OSX path.

CNSMenu_DefineMenuFile( "/xmldocs/my_menu.xml" )
Example 3

Specifies the xml file location using the CNSMenu_File_GetPath function to dynamically get the path to the database. This assumes the XML file is located in the same folder as the database file.

CNSMenu_DefineMenuFile( CNSMenu_File_GetPath( "Database" ) & If( Abs( Get( SystemPlatform ) ) = 1 ; "/" ; "\\" ) & "my_menu.xml" )