Import a library. Importing reads the XML associated with a library and makes it available to be installed as an application. This tag must appear within a <server> tag.
Libraries can be installed either from a Python module, or directly from a path. For example, this installs a library from a Python module:
And this installs a library from a a relative path:
priority attribute is used when two element have the same element reference. This is typically used to override an element in another library. For example, let's say we have the following <macro> in a library called
sushifinder.shop, which calculate tax on a shopping cart:
We could replace this by defining the following in another library:
Note the use of a full element reference (including library name) in the
libname attribute. This tells Moya that the macro should go in a library other than the one it was declared in. If the code above is in a library with a higher priority then it will replace the macro in the
templatepriority is used when there are conflicting template paths. The template from the library with the highest priority wins. This value takes precedence over the
priority defined in lib.ini.
||Priority for library data||integer||No|
||A path to a Moya library||text||No|
||Name of the library||text||No|
||Priority for elements||integer||No|
||Python import, e.g. widgets.moya.widgetapp||text||No|
||Priority for templates||integer||No|