Creating a custom template Oracle APEX part-1

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.

  • In Application Builder, go to the application you are working on. After that, go to the Shared components.
  • In the shared components page, click on Theme and unsubscribe theme. 
  • Coming forward to Global Template Options. Click on edit template Option Group. 
  • Click on Create button as per screenshot. 
  • Create/edit template Option Group here need to define group name, Identifier and Template Type as per screenshot. 
  • Add template option as per above defined group “body background”. You can add multiple background color as per your requirement. 
  •  Copy and below css in page Inline css option.
.t-Region-body--bgBlue div.t-Region-bodyWrap div.t-Region-body
 {
 background: blue;
 }

  • Create a page with static region and see the template option there is body background option is coming which we have added above. 
  •  Now Run the page and see the region background color have been changed. 

Demo

Video link