In this custom page example, we'll create a very simple page.
Create a page with the title hello-world and add a single HTML block to it. The page is added to the person sub menu so that a user sees it in their burger bar. See our topic, Burger bar.
Create a hello-world page
- Navigate to Applaud Administrator: Setup: Pages and select Add
- Enter these properties and select save:
Property Value Notes Title Hello world We like to use Sentence case, not Title Case; lots of capital letters are hard to read on the eye Icon speaking See Applaud Administrator: Setup: Icons to get creative! Icon color Green Page Id hello-world Sub-menu Person sub-nav (custom) The name of your person sub-nav will probably vary from this one here. Pick the one that has most of your existing menu items on it.
See Menus for more information.Add this page into the submenu Checked Location Root (top-level menu item) You could also put this page somewhere else on the menu if you'd rather. Simply select its position here.
See Menus for more information.
Create a hello world block
- Scroll down to the Blocks section and hit Add
- Enter the Title Hello world, choose the Type HTML, and hit Save
- Enter the Raw HTML as Hello world and Save
- Navigate back to the block setting and scroll down to the Grants section and hit Add
- Choose your employee Role from the list and hit Submit. Eg, Applaud Employee Self Service Role.
Test access to the block
- In the Grants section, hit Test Access
- Enter your username in the Username field. Do you have access? Great! If you don't have access, please check that you have the role you specified when granting access to your block.
Congratulations. You've created your first custom page.
Let's test it out:
- Navigate to the Used in Pages section and select Hello world
- On the Page Link, open it in a new tab (eg, right-click and select Open Link in New Tab)
Note that the Page Id in your browser's address bar matches the one specified when creating the page.
You'll also see it on the sub-menu.
Search for anyone and select them
You'll see your new Hello world page on everyone's sub-menu and when you select it, it reverts back to your sub-menu. Hmm, that's probably not what you want. In most cases, you'll want to pass an Object Id into a page so you can adjust who sees what for whom.
Let's make a couple of tweaks:
- Hit the Edit Page quick link (top-right), select Edit Page, and Edit against the Page settings
- Set the Object Id format to {PERSON_ID}, the Object Id handler to xxas_per_pkg.per_and_primary_asg_ctx and Save
- Select the Edit Page quick link again, select Edit Block, and press Edit on the block settings
- Change the Security type to Role and data, the Object to Applaud HR Person, and Save
- Navigate down to the Grants section of the block and delete the grant created earlier
- Create a new grant. Choose the same role and this time specify the Instance Set Applaud HR Person Restricted to Logged on Employee. Looking better? The access control has been re-worked so that the hello-world page now only shows when looking at your own Person Id.
- Let's go one final step further. Let's allow managers to see this page against their reports:
- Create a second grant for the block. This time, choose your manager role (eg, Applaud Manager Self Service Role) and choose to specify the Instance Set Applaud HR Person Restricted to Logged on Manager's Reports. Managers with the granted role will now see your hello-world page when looking at their direct and indirect reports.
Mobile app
Open your app on a mobile device. You'll see your new "Hello world" page without any app updates and without you writing a single line of code.