In most Oracle APEX applications, every page has a Page Title displayed at the top. While useful, this title occupies vertical space, especially in apps where screen real estate matters (dashboards, reports, dense forms).
So the goal is simple: Show the page title near the APEX logo instead of consuming page content space.
This keeps the UI clean, professional, and consistent across all pages.
Instead of placing the page title inside the page body:
✅ Fetch the current page title dynamically
✅ Display it right after the APEX logo
✅ Do it globally, so it works for every page
All of this is achieved using:
✅ Global Page (Page 0)
✅ One Dynamic Action
✅ PL/SQL + JavaScript
Simple, effective, and reusable.
1️⃣ Create a Global Page Item
On Page 0 (Global Page), create a hidden item:
P0_PAGE_TITLE
This item will hold the current page's title.
2️⃣ Create a Dynamic Action on Page 0
Event: Page Load
This dynamic action will have two True Actions.
🔹 True Action 1: Fetch Page Title (Server-side)
Action: Execute Server-side Code
Language: PL/SQL
Items to Return: P0_PAGE_TITLE
BEGIN
SELECT page_title
INTO :P0_PAGE_TITLE
FROM apex_application_pages
WHERE application_id = :APP_ID
AND page_id = :APP_PAGE_ID;
EXCEPTION
WHEN OTHERS THEN
:P0_PAGE_TITLE := null;
END;
✔️ This dynamically fetches the page title
✔️ Works for all pages
✔️ Safe fallback using exception handling
🔹 True Action 2: Inject Title Near Logo (JavaScript)
Action: Execute JavaScript Code
var a = $v("P0_PAGE_TITLE");
$(".t-Header-logo").each(function () {
$(this).append(
'<span class="extra-text" style="font-size:20px; font-weight:bold; margin-top:15px;">'
+ a +
'</span>'
);
});
🧩 What This Does
Reads the page title from P0_PAGE_TITLE
Appends it right after the APEX logo
Makes it visually clear and elegant
🎨 UI Result
No extra space consumed in the page body
Page title is always visible
Cleaner and more professional header
Works automatically for every page
✅ Why This Tip Is Useful
✔️ Zero page-level configuration
✔️ Centralized logic (Global Page)
✔️ Improves UX without redesign
✔️ Easy to customize with CSS later
This is one of those small changes that make your app feel premium.
Comments
Post a Comment