Content / help / navbars .. summary-view << previous next >>

Navigation bars

Two ways to make a top navigation menu

  1. Build a menu array
    Set $this->topNav to an associative array for the top navigation menu in the config file : /applications/englishtap/config/config.php You can build an array in PHP :
    $this->topnav = array("Home"=>'/home',"Help"=>'/help'); Place this code into your outer template where you want the top navigation menu to appear
    <?php echo $this->biscuitsDB->setTopNav(); ?>
  2. Write HTML for your menu
    Put your top navigation menu into it's own file and in your outer-template for the web page, pull in this menu where it is needed.
    You could use a line of code such as :
    <?php echo $this->biscuitsDB->digCode(PATH_TO_MENU_FILE);>? /applications/englishtap/config/topnav.php
If your navigation bars are an array. the biscuits engine will set links to your profile here ( See PHP code label USERNAME: )

If your webpage is a full page, containing <html> and <body> tags, this full page will be rendered in full. However, if you loaded html is just a fragment of the page, containing some content for display, your web content is inserted into the page using a template page. Your website can mix and match, these two methods of building pages. Inside the template page there are some token strings. For example @topnav, which gets turned into @topnav by the biscuits engine at run time.
Also a footer navigation bar might be in your page.
For example @footnav, which gets turned into footnav);?>

You can set your own topnav code by setting this->topnav in your config. You can even set it for each page separately by setting this->topnav in PHP inside a view file.

To set topnav off, set $this->topnav = false or $this->footnav = false

Setting up general navigation

You can set up some general navigation to use on all pages. You can override this navigation for specific pages in PHP whenever a view page is loaded.

These two configuration files are for HTML navigation code. They are not mandatory. You can ignore these navigation bars and set them to a space or you can set all you navigation at run time in each separate view file. This method may be best when you have lots of pages and want the nagivation to be context sensitive

iBiscuits LOGO