Step 1: Create a Component

This step explains how to create your custom component in Oracle Content Management.

When you create a custom component, it must be registered to be usable by Oracle Content Management. To inform Oracle Content Management about your component, you use the Components page in Site Builder to register the component.

There are two types of components to register.

  • Local component:

    • This is a component whose files are stored on the Oracle Content Management instance server.

    • The main advantage is that you don’t have to worry about cross-domain or cross-protocol issues because the files are located with your site.

    • The disadvantage is that you can’t execute any middle-tier logic in the Oracle Content Management server, so you must use REST APIs to remote servers that support CORS.

    • This type of component may be embedded into the page directly, or you can choose to use an inline frame to render the component on the page.

  • Remote component:

    • A component where the files are stored on a remote server and you only register the URLs to the Render and Settings panel for the component.

    • A remote component provides an advantage if you have server-side logic that must execute when creating the content for your component.

    • The disadvantage is that you must ensure that any cross-domain and security issues are resolved for accessing those URLs.

    • Remote components always use an inline frame to render on the page.

To create and register a local component:

  1. On the Oracle Content Management home page, click Developer.

    The Developer page is displayed.

  2. Click View all Components.

  3. From the menu, choose Create Local Component.

  4. Enter a name for the component; for example, A_Local_Component.

  5. Enter an optional description.

  6. Click Create.

    After you have done this you’ll see a component named A_Local_Component in your list of components.

Check the Results for Step 1

Now that you’ve successfully created a component, you should see the component in the Component palette for any site you create. Use these steps to validate your component creation:

  1. Create a site named localComponentTest.

  2. Select the site and click Open.

  3. Click Edit.

  4. Create an update for the site and give it a name and, optionally, a description.

  5. Select a page on the site.

  6. Click component icon in the side palette and select Custom to display the list of custom components.

  7. Select A_Local_Component from the Custom component list and drag and drop it onto the page.

    You should now see a default rendering for the local component you created.

  8. Select Options menu icon in the banner for the component you just dropped onto the page.

  9. Select Settings.

  10. Change the alignment and set the style for the component.

  11. Close the Settings panel.

The following steps explain how the custom component is built and how to modify it for your own purposes. Continue to Step 2: Review the Structure of Your Local Component.