Avoid costly mistakes and gain instant clarity!
If you’ve ever accidentally worked in the wrong environment (like production instead of development), you know how valuable a clear banner can be. In this blog post, I’ll show you—step by step—how to add an info banner to your APEX app that only appears in certain environments (like DEV).
If you’ve ever accidentally worked in the wrong environment (like production instead of development), you know how valuable a clear banner can be. In this blog post, I’ll show you—step by step—how to add an info banner to your APEX app that only appears in certain environments (like DEV).
1. Why Use an Environment Banner?
When you’re juggling multiple APEX apps and environments (DEV, TEST, PROD), it’s easy to lose track. An environment banner helps you:
- Instantly see where you are (DEV, TEST, PROD)
- Avoid mistakes (like testing in production)
- Get key info at a glance (APEX version, DB version, schema, time)
2. Where to Find the Right Settings
To make the banner appear everywhere, you’ll add it to Page 0.
Page 0 is the global page in APEX—anything you add here shows up on every page of your app.
Page 0 is the global page in APEX—anything you add here shows up on every page of your app.
- Login Page: For the login page (usually Page 9999), you’ll need to add the banner separately, since Page 0 content doesn’t show up there by default.
3. Step-by-Step Guide
Step 1: Add a Region to Page 0
- Open the APEX Builder and your application.
- Navigate to Page 0 (Shared Components → Pages → 0).
- Add a new region:
- Region Type: Blank with Attributes
- Position: Banner (or wherever you want it)
Step 2: Insert Dynamic Content
- Set the region type to “Dynamic Content”
- Source Type: PL/SQL Function Body returning CLOB
- Paste in this PL/SQL code:
Step 3: Show the Banner on the Login Page
- Go to Page 9999 (Login Page)
- Add a “Blank with Attributes” region here as well
- Position: Body Header (so the banner appears at the top)
- Content: Use the same PL/SQL code as above
4. Show the Banner Only in DEV (Optional, but Recommended!)
Want the banner to show only in specific environments? You’ll need an Authorization Scheme:
Create an Authorization Scheme
- Go to Shared Components → Security → Authorization Schemes
- Create a new scheme
- Name: ONLY_FOR_DEVELOPMENT
- Type: PL/SQL Function Returning Boolean
- Example code:
- Assign the Authorization Scheme to your banner region
- Now the banner will only appear if your schema name contains “DEV”.
5. What Are the Benefits?
- Safety: Instantly see which environment you’re in.
- Faster support: All important info at a glance.
- Error prevention: No more accidental work in production.
- Modern look: The banner is animated and stylish.
6. Conclusion
An environment banner is a small but extremely helpful feature for every APEX developer.
With just a few steps, you protect yourself and your team from mistakes—and always have the perfect overview!
With just a few steps, you protect yourself and your team from mistakes—and always have the perfect overview!
- Try it now: Add the banner to your app and test it out!
- Share your experience: Did the banner help you? Let us know in the comments!
- Follow for more tips: Stay tuned for more practical APEX tricks!
Happy developing—and stay safe!
{fullWidth}