An advert block displays one or more images and associated caption text.
An advert block can either display a single advert image and caption, or it can randomize based on a group of images and captions.
Properties for an advert
A single advert block has the following properties:
Property | Example Usage | Description |
---|---|---|
Single or random | Single advert Randomized advert | Choose between a single static advert or a randomized group of adverts |
Static or dynamic | Static Dynamic | Choose whether the advert is statically defined in the metadata or retrieved at runtime with dynamic content |
Dynamic function | xxx_custom_package.custom_function | Used for dynamic adverts; the name of a custom PL/SQL function that retrieves the advert dynamically |
Filename |
custom/some_image.jpg | The image file, uploaded to the Oracle E-Business Suite Server at $OA_MEDIA/xxas/<Filename> |
Line 1 text | Welcome | The text shown on the first line |
Line 2 text | to the new world of work | The text shown on the second line |
Type of link |
Applaud HCM page No link URL | Hyperlink when clicking the advert (optional). Choose between no link, an in-app page (Applaud HCM page), or an external URL. |
Page | search worklist | The in-app page to where the advert should link. Only shows when the Type of link is Applaud HCM page. |
Open in modal | Checked Unchecked | Whether the advert should open in a modal window or not. Only shows when the Type of link is Applaud HCM page. |
URL | http://www.applaudsolutions.com | The external URL to where the advert should link. Only shows when the Type of link is URL. |
Show button | Checked Unchecked | Whether to show a call to action button or not |
Button label | Let's go | The label of the call to action button |
Text background-color | rgba(255,255,255,0.8) | RGBA color (red, green, blue, alpha) |
Text box width % | 50 | The percentage width of the text box in relation to the ad |
Text box x position % | 0 | The % x position of the whole text box |
Text box y position | Top Middle Bottom | The y position of the whole text box |
Text alignment in box | Left Center Right | The horizontal alignment of the text inside a text box |
Text box bottom margin | 5 | The margin from the bottom in em units |
Text box padding | Checked Unchecked | Whether or not to include padding around the text box |
Advert padding | Checked Unchecked | Whether or not to include a margin between the advert |
Randomized advert
As well as creating single adverts, you can also create a group of individual adverts that are randomly displayed. To do this:
- Create individual advert blocks for each advert you wish to randomize, setting Single or Random to Single advert in each case
- Create an Advert block for the group and set Single or Random to Randomized advert in the block's settings
- Use the Advert blocks to randomize section to include the individual advert blocks you created in step 1
- Detach the single advert blocks you created in step 1 from the page so that they don't show twice
Using a dynamic advert function
If you wish to create an advert whose properties change dynamically, you specify the dynamic PL/SQL function in the Dynamic function property above. This should be a PL/SQL function that contains the following signature:
FUNCTION get_advert
(p_function_id IN number
,p_function_name IN varchar2
,p_function_parameters IN varchar2 DEFAULT NULL
,p_object_id IN number DEFAULT NULL
,p_obj_name IN varchar2 DEFAULT NULL
,p_keys IN xxas_com_keys_type DEFAULT NULL) RETURN XMLType;
Here is a sample body for a dynamic advert:
...
IS
l_return_xml XMLType;
BEGIN
SELECT XMLElement
("item"
,XMLForest
('advert' as "type"
,'transparent' as "bgColor"
,'Some text' as "line1"
,'Call to action' as "buttonText"
,'http://www.applaudsolutions.com' as "link"
,xxas_com_sec_pkg.get_branding_image_src as "image"
)
)
AS "data"
INTO l_return_xml
FROM dual;
RETURN l_xml;
END get_advert;