Tag Archive | "navigation"

Tags: , ,

Creating Navigation Widgets with PHP Seagull

Posted on 05 June 2003 by Demian Turner


This tutorial presumes you’ve had a look at the PHP Seagull app framework.

At the moment the PHP Seagull offers a fairly simple API for creating a range of navigation widgets.  The three main approaches are as follows:

  1. Using a wrapper for PEAR’s HTML_Treemenu:To create a menu like the one used in the admin section under Publisher you can use the wrapper method getGuruTree() in the CategoryManager class.  You can customise the defaults set in the method, basically the data is grabbed from the category table which follows an id-parent id structure and is simple to build.  Of course you can use Publisher, hit the categories button and use the web API to build up the tree, so far it does everything you’ll need except node ordering, this is coming soon.

    The main reason for using getGuruTree() should be when you need to constantly update the category information, like in an admin role updating the nodes, so there’ll be quite a big DB call for each request (depending on how many nodes are in  your table) and obviously no caching.


Comments (0)



Demian Turner's currently-reading book recommendations, reviews, favorite quotes, book clubs, book trivia, book lists



PHPkitchen recommends you also check out the following sites :

Accounting for Small Businesses

FreeAgent sign-up