Contents of the XML navigation files
As mentioned in the introduction, the icons and text are controlled by
XML navigation files contained in common/navxml/ and local/navxml/. These all
have the same definition. The items in local/navxml/ override those in common/navxml.
But, it is not necessary to copy all the parameters from common/navxml to local/navxml.
Only those parameters in a particular NAV item need to be specified in local/navxml.
Here is a simple NAV.XML file which will serve as an example.
<?xml version="1.0" encoding="UTF-8"?>
<NAVOBJECTS>
<NAV PAGE="home" ORD="10">
<THEME NAME="*default*">
<TEXT>Home</TEXT>
<IMAGE>common/images/core/home.gif</IMAGE>
</THEME>
</NAV>
<NAV PAGE="user_usermymod" ORD="140">
<THEME NAME="*default*">
<TEXT>My profile</TEXT>
<IMAGE>common/images/user/profile.png</IMAGE>
<PARMS>"&id_person=".$_SESSION['_obperson']['id_person'];</PARMS>
</THEME>
</NAV>
<NAV LINK="http://dev.obliquid.com" ORD="55">
<THEME NAME="*default*">
<TEXT>Obliquid Development Site</TEXT>
</THEME>
</NAV>
</NAVOBJECTS>
NAV has three attributes.
- LINK. This specifies a URL. Normally, this would point to an external
URL. If no PAGE attribute is supplied along with LINK, then it is assumed that
this URL is available to all users, whether logged on or just visiting. LINK
should be a complete URL, suitable for use in an HREF.
- PAGE. This specifies a "nav" security object within Obliquid. The
permissions of the current user will automatically be checked, and this entry
will NOT be returned if the current user does not have permission to this.
If no LINK is specified, PAGE is considered an Obliquid page, and the necessary
Obliquid prefix will be prepended so that the page will be displayed.
- ORD. This specifies the order that the icon will appear. It MUST
be specified in either the common or local file. If no ORD is supplied, then
the item will not appear.
THEME has one attribute.
- NAME. This specifies the theme name that the other entities apply to.
If NAME="*default*" is used, then the entities will be used if no other
information is supplied that applies to the theme that the current user is using.
If no NAME is supplied, *default* is assumed.
THEME has three elements.
- TEXT. This specifies the text that will be displayed as a popup text
if an IMAGE is supplied. Otherwise it will be the text displayed in the link.
Note that TEXT is translated into the current user language prior to being returned.
- IMAGE. This specifies the path to the image which should be displayed.
If no IMAGE is supplied, then the value *none* will be returned.
- PARAM. This specifies any additional parameters that are to be
included in the URL that is used. This is EVALed with the following PHP code
eval("\$parms = $parms").