Global Configuration versus Page Configuration |
![]() ![]() ![]() |
All the configuration files outside the config/pages directory are considered to be global configuration files. The file name of a global configuration file is not important; The only exception to this is "sysinfo.xml". The names of the configuration elements in the global configuration files must be unique through the whole application. It is the developers responsibility to ensure that the global name he is using is not used elsewhere. The file name of the page configuration files is important in terms of making the configuration element names unique through out the application.
If a dataSource element is used in the configuration of page "ProductList" ...
then its actual configuration name becomes "/ProductList.products" When searching for a configuration element, MoreMotion looks first into the configuration of the current page and if not found there then looks into the global configuration. See Page Configuration. Addressing other configuration elements from a page configuration element When addressing another configuration element from a page configuration element by means of specifying its name in name attribute, the first character of the attribute value becomes important.
In the example above the template "Template1" exists in the same page configuration file; therefore no "/" character is used before the template name and "Template1" is addressed relatively.
In the example above, a "/" character is used in the first position of the name attribute which means "Template2" is a global template existing in a global configuration file. Note that, the configuration files that exist outside the config/pages directory are global configuration files. |