Creating a custom template Oracle APEX part-1

Share on:

Creating a custom template.

Templates are organized first by a template type and then by template class. Template types include page, region, report, list, button, label, and popup list of values (LOV). You can use template options to apply different colors or accents, different spacing and padding, and display form fields with different alignments. They reduce the need to have multiple similar templates defined in a theme.

If you want to modify existing template then need to unsubscribe theme first.

  1. In Application Builder, go to the application you are working on. After that, go to the Shared components.
  2. In the shared components page, click on Theme and unsubscribe theme. preview
  3. Coming forword to Global Template Options. Click on edit template Option Group. preview
  4. Click on Create button as per screenshot. preview
  5. Create/edit template Option Group here need to define group name, Identifier and Template Type as per screenshot. preview
  6. Add template option as per above defined group “body background”. You can add multiple background color as per your requirment. preview Copy and below css in page Inline css option.
1.t-Region-body--bgBlue div.t-Region-bodyWrap div.t-Region-body
2 {
3 background: blue;
4 }
  1. Create a page with static region and see the template option there is body background option is coming which we have added above. preview Now Run the page and see the region background color have been changed. preview

Demo

Video link

You might also like: