APEXblog.nl - Tips and Tricks

About This Blog:
I (Richard Weug) started this blog primary for myself to save all kinds of Apex tips and tricks in one place. To use it as a place to write down how I used some coding in my own projects, but also to copy and paste all kinds of articles I find on the Internet. (So I never have to wonder on what website did I read about??? When I see something interesting I collect the content so I have my own archive/knowlegde base.

View my profile on LinkedIn

 

Tips & Tricks

Print
15
Mar

Customize the APEX Workspace Login Page

Written by Richard Weug. Posted in Tips and Tricks

One nagging thing about APEX occurs often to me. It’s the inability to customize the Workspace Login Page.

In APEX Instances within corporations you may want to display your own Logo or some custom text explaining your developers what to do and what not.

Some lines of javascript and jQuery to the rescue, i build a nice little function which is super easy to call and gives you full flexibility to customize the Workspace Login Page.

This is what the Login Page per Default looks like:

After calling the new function the Login Page looks much nicer (notice the missing 3 regions at the bottom):

Looks way better, doesn’t it?

Now the most important part, here is all the code you need to get it running on your instance, you put this code in the “Login Message” which is defined in the Apex Administration panel under “Manage Instance”:

<script type="text/javascript" src="http://apexlib.oracleapex.info/ApexLib_Loginpage.js"></script>
<script type="text/javascript">
apexlib.loginpage.customizeLoginPage
( "click-click IT Solutions"
, "1.8em"
, "Welcome to the APEX Hosting Instance of 
    <a href='http://www.click-click.at' target='_blank'>click-click IT Solutions</a>.<br />
   If you don't have a login please contact the Administrator to get one.<br />
  <br />Have a nice day!"
, "http://www.click-click.at/wp-content/themes/click/images/clickclick_logo.gif"
, "http://www.click-click.at"
, false
, false
, false
, false);
</script>

You can hotlink the new ApexLib_Loginpage.js directly from http://apexlib.oracleapex.info, or you download a local copy from the ApexLib Sourceforge SVN.

Taking a look at the function declaration should explain the options:

apexlib.loginpage.customizeLoginPage = function
( pLoginRegionTitle          // string to be displayed in the region header
, pLoginRegionTitleFontSize  // font-size for the region title, should include em or px
, pLoginRegionText           // replaces the explanation text inside the login-region, can include HTML
, pLoginRegionLogoImage      // URL pointing to an image with max size 240x200px
, pLinkLogoToHref            // when user clicks the new Logo, this URL will be opened
, pShowLoginMessageRegion    // true/false: show the Login Message Region (the yellow one)
, pShowWorkspaceRegion       // true/false: show the Workspace Region
, pShowGettingStartedRegion  // true/false: show the Getting Started Region
, pShowCommunityRegion       // true/false: show the Community Region
)

Original article by: Peter Raganitsch - http://www.oracle-and-apex.com/customize-the-apex-workspace-login-page/#more-390