The seasoned developers certainly know that among the apex built-in substitution strings there isn't any returning a page alias, whereas there is indeed a very handy substitution string returning the application alias for instance.
Page aliases allow you treat apex pages in terms of symbolic names in contrast with less meaningful numeric page IDs and they also may give you an edge when it comes to page indexing by web search engines, thanks to their self-explanatory names and assuming you did use such self-explanatory name of course... :-D
What i'm going to briefly document here is a 20 second set up process that allows you to stuff a brand new APP_PAGE_ALIAS into the built-in collection of substitution strings.
- Create an application item called APP_PAGE_ALIAS and define it as restricted if you don't want that anybody messes around it.
- Create an application computation for APP_PAGE_ALIAS with computation frequency Before Header, computation type SQL Query, containing the following computation source (based on an apex dictionary view):
SELECT page_aliasThe computation will run on each and every page automatically updating the value of the application item that you can freely use in the form &APP_PAGE_ALIAS. inside branching, URLs, text and so on.
WHERE application_id = :APP_ID
AND page_id = :APP_PAGE_ID
I find this a nice example of what you can do with application-wide computations and the apex dictionary views in a minimal amount of time.
See more articles about Oracle Application Express or download tools and utilities.