0

In DotCMS, can we pull data for content from external database instead of dotcms database and display?
I created new content type as Text with two fields. 1) KEY field with type text and 2) VALUE field with type text.
When I try to add new content type, it should pull data directly from external database Adding content or updating the content also should go to external database. Is there any way to do this?

Mahesh G
  • 51
  • 1
  • 12

1 Answers1

0

This is not how dotCMS was designed to work. dotCMS expects content to be stored in dotCMS. It would be possible to implement pre- and post hooks against the contentlet API that would intercept the store and retrieve calls to push and pull content from an external source when content is added/modified/deleted in dotCMS, basically keep an external source in sync.

wezell
  • 573
  • 3
  • 7
  • If we need to sync external DB to dotCMS DB, Is there any way to insert data into dotCMS DB instead of calling Rest API that are provided. In the Rest API, I see a limitation to save/publish only one content at a time. https://dotcms.com/docs/latest/rest-api-end-points#ContentResource Can I do multiple PUT or POST instead of single PUT and POST? /api/content/save/1 /api/content/publish/1 – Mahesh G Jun 13 '17 at 15:31