Tuesday, March 25, 2008

Oracle Application Express (Apex) Breadcrumbs

In the early versions of Oracle HTML DB (the old name for Oracle Apex) breadcrumbs were called menus. Under the covers, in the code, they still are. They work great as breadcrumbs, but they still work as menus. Many Apex training classes will tell you to use lists for navigations and use breadcrumbs for, well, breadcrumbs. In most cases, though, you can use a single breadcrumb structure for both. Let's say you have the following page/navigation structure


  • Training

    • In Class

      • Application Express

      • Oracle Database Tuning

      • 10g Application Server

      • Oracle Portal



    • Web Based

      • Application Express

      • SQL

      • Oracle Database Management

      • PL/SQL





If you are on the SQL page you want a breadcrumb like this:
Training > Web Based > SQL

You may also want a menu that looks like this
Application Express
SQL
Oracle Database Management
PL/SQL

You can use the same breadcrumb to provide both features. Just create two regions, one with a breadcrumb template and another with a breadcrumb "menu" template, typically called Heirarchical in new versions of Apex. Play with the template, changing "Start With" to Current Breadcrumb. You will get a menu out of your breadcrumb. If you are on the "Web Based" page, you could create a template with "Start With" set to Child Breadcrumb Entries. This would give you a Menu that looks like this:
Application Express
SQL
Oracle Database Management
PL/SQL

Play with the breadcrumb templates and Start With and you may find they work far better than lists for navigation.

No comments: