Change global page layout (template) in Oracle APEX
A global page (previously referred to as Page 0) functions as a master page. Developers can create a separate Global page for each user interface. The Application Express engine renders all components you add to a Global page on every page within your application. You can further control whether the Application Express engine renders a component or runs a computation, validation, or process by defining conditions.Oracle App Builder User’s Guide
There is one tricky thing regarding the global page which is putting APEX components on the positions that are not available in a default template for a global page.
Let’s say you have existing pages with the template set to Left and Right Side Columns. In the Page Designer they have the layout like this:
Now, imagine you have a common region with items / buttons / information that should be rendered in all these pages. Naturally, these components should be created on the global page so you don’t have to implement them on each page.
If you go to the global page you will see that the page designer is using default layout which is the Standard page template. From the perspective of the global page, there is no option to create a region in the left or right column.
There is a way to create a region on the global page in the left / right column by using option Copy to other Page from the page that supports the left / right column.
Unfortunately, the result at the global page will be information that the copied region is in an invalid position and won’t be rendered:
Comment on invalid position
Page designer gives a developer a hint that this region won’t be rendered but it is true only for pages that are using page template without left or right column. Regions are rendered if the current page supports these positions.
This information is displayed because a region was copied with all attributes – in particular, region position (left side column).
The global page layout in Page Designer is set based on the Theme Default Page Template which by default is the Standard page template. In that case, the global page layout doesn’t support these positions.
There is no option in the page designer to change the template of the global page – section Appearance attribute is missign the template attribute.
But did you know there is a way to change the global page layout to support these positions?
You have to navigate to Application / Shared Components / Themes and edit the theme default page template.
When you change the default page template to Left and Right Side Columns then page designer is supporting this layout for the global page.
There is one thing you have to keep in mind if you decide to change the default page template in your theme. It will be applied to all pages where you haven’t defined what template should be used (which is the default when creating new pages). It means you have to update all pages that were using the default template (which previously was Standard template) so they will be still rendered using the Standard template.
Don’t worry, you don’t have to update pages one by one. You can use Cross Page Utilities to update up to 15 pages at once.
In this view, you can see all the pages in your application.
If a select list in the column template is blank, it means this page uses the theme default page template which you have changed to Left or Right Side Column. Now you need to update these pages to use the Standard template.
Now you can take advantage of having the global page layout supporting the left and right column!