How to Create Dynamic Navigation Menu in Oracle APEX
How to Create Dynamic Navigation Menu in Oracle APEX
Sometimes user don’t want to go with a default navigation menu then on those cases will go ahead with a dynamic navigation menu so today I will let you know how you can create a dynamic navigation menu.
- Create a table with following this SQL script:
1CREATE TABLE "NAVIGATION_MASTER"
2 ("LEVEL" VARCHAR2(100),
3 "NAV_NAME" VARCHAR2(100),
4 "PAGE_NO" VARCHAR2(100),
5 "PARENT_ID" NUMBER,
6 "NAV_ID" NUMBER,
7 "ICON_IMG" VARCHAR2(50)
8 )
9/
- Create a Name “Custom Navigation” and Choose the type Dynamic.
- Copy and Paste the following SQL script:
1select
2 LEVEL "level",
3 NAV_NAME "label",
4 decode( connect_by_isleaf, 0, '','f?p=&APP_ID.:'
5 || TO_CHAR(PAGE_NO)
6 || ':&SESSION.:::::'
7 ) target,
8 'YES' as is_current,
9 decode(nvl(ICON_IMG, 'A'), 'A', '', ICON_IMG) image
10from
11 NAVIGATION_MASTER
12start with
13 PARENT_ID is null
14connect by
15 prior NAV_ID = PARENT_ID
16 order siblings by NAV_NAME desc
-
Go to Shared Components»User Interfaces then Change Navigation Menu List from Desktop Navigation menu to “Custom Navigation” which I have created.
-
Create a form on apex page with a default process based on the table “Navigation_Master”.
-
Now Enjoy! you can create your own navigation menu directly from pages.