Search This Blog

Showing posts with label Change the Navigation Bar. Show all posts
Showing posts with label Change the Navigation Bar. Show all posts

Tuesday, June 24, 2025

How Do I Change the Navigation Bar

Modifying the Navigation Bar in Oracle APEX

The Navigation Bar in Oracle APEX is a customizable area at the top of the page, typically used to display user information, links, and actions such as login/logout, profile settings, or help links. The Navigation Bar is controlled through a List in Shared Components, which can be modified to include custom links, icons, or dynamic content.


Understanding the Navigation Bar List

In the List Editor, the Navigation Bar contains entries such as:

  • "&APP_USER." – This is a substitution variable that displays the currently logged-in user's name.

  • "#" – A placeholder used when the list item does not contain a hyperlink (for example, for displaying static text like the username).


Steps to Modify the Navigation Bar

1. Locate the Navigation Bar List

To change the Navigation Bar contents, follow these steps:

  1. Open Your Application

    • In APEX, go to the App Builder and select your application.

  2. Navigate to Shared Components

    • Click on Shared Components from the Application Home page.

  3. Find the Lists Section

    • Under Navigation and Lists, click on Lists.

  4. Select the Navigation Bar List

    • Find the list used for the Navigation Bar (typically named Navigation Bar or something similar).

    • Click on it to open the List Editor.


2. Editing the Navigation Bar Items

Once inside the List Editor, you can modify existing entries or add new ones.

Modify Existing Items:

  • Click on an item (e.g., &APP_USER.) to edit it.

  • You can change: 

    • Label (Text displayed in the navigation bar).

    • Target (Specify a URL if it should link somewhere; use # if it's just a display item).

    • Icon (Add an icon using Font Awesome or APEX icon classes).

Example: Changing the Display of Logged-in User

Instead of just displaying &APP_USER., you can customize it to include additional details:

  • Example Label: Welcome, &APP_USER.!

  • Target: # (No link, just a static text).


3. Adding New Items to the Navigation Bar

To add new items such as Logout, Profile, or Help, follow these steps:

  1. In the List Editor, click "Create List Entry".

  2. Enter a Label (e.g., Profile, Logout, or Help).

  3. Specify a Target (Link): 

    • Profile Page: f?p=&APP_ID.:100:&SESSION. (Replace 100 with the Profile Page ID).

    • Logout: &LOGOUT_URL. (Automatically logs out the user).

    • Help: A URL to your application's help page, like https://yourdomain.com/help.

  4. Set an Icon: 

    • For a profile: fa-user

    • For logout: fa-sign-out-alt

    • For help: fa-question-circle


4. Reordering and Managing Visibility

  • Reorder List Items: Drag and drop items in the List Editor to change their order.

  • Conditionally Display Items: Use conditions to show or hide items based on: 

    • User role (APP_USER = 'ADMIN')

    • Authentication status (APP_USER IS NOT NULL for logged-in users).


5. Applying Changes to the Application

  1. Save the changes in the List Editor.

  2. Run the application to verify that the Navigation Bar reflects the updates.


The Navigation Bar in Oracle APEX is a powerful tool for displaying important user information and quick-access links. By modifying the associated List, you can customize its content, appearance, and behavior to match your application’s needs.


EXAMPLE:

If we start with a navigation bar like this:

This is what we find in the List Editor for the Navigation Bar. “&APP_USER.” Is used to the login name of the user. The “#” is used to signify that this is not a hyperlink entry. 

A screenshot of a computer

Description automatically generated