Creating a navigation script

Actually creating a navigation script is a simple process. All the hard work is in creating the XML file. The function getNav("module") in common/classes/obliquid/nav.php returns an index array. Each entry in the array with three values. The array is in order by ORD.

Here is what core/index.php looks like.

    
require_once "common/classes/obliquid/nav.php";

/** access structure for core module */
function core_index_()
{
    global $_obweb;

    $nav = & new nav();
    $corelinks = $nav->getNav("core");    //Get the array for the icons

    //Now assign them for the template, and we are done
    $_obweb->smslot->assign("corelinks", $corelinks);
}

  

And here is what index.tpl looks like.

    
{{* $Id: navigation.xml,v 1.6 2003/11/30 19:44:48 slocati Exp $ *}}
<table width="160">
{{foreach from=$corelinks item=alink}}
<tr><td>
{{if $alink[2] eq "*none*"}}
<a href="{{$alink[0]}}" class="textmini">{{$alink[1]}}</a>
{{else}}
<a href="{{$alink[0]}}" class="textmini">
<img src="{{$alink[2]}}" width="16" height="16" border="0">&nbsp;{{$alink[1]}}</a>
{{/if}}
</td></tr>
{{/foreach}}
</table>