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:
CREATE TABLE "NAVIGATION_MASTER"
("LEVEL" VARCHAR2(100),
"NAV_NAME" VARCHAR2(100),
"PAGE_NO" VARCHAR2(100),
"PARENT_ID" NUMBER,
"NAV_ID" NUMBER,
"ICON_IMG" VARCHAR2(50)
)
/
- Create a Name “Custom Navigation” and Choose the type Dynamic.
- Copy and Paste the following SQL script:
select
LEVEL "level",
NAV_NAME "label",
decode( connect_by_isleaf, 0, '','f?p=&APP_ID.:'
|| TO_CHAR(PAGE_NO)
|| ':&SESSION.:::::'
) target,
'YES' as is_current,
decode(nvl(ICON_IMG, 'A'), 'A', '', ICON_IMG) image
from
NAVIGATION_MASTER
start with
PARENT_ID is null
connect by
prior NAV_ID = PARENT_ID
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.