dotcms

DotCMS - Using content from external database


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?


Solution

  • 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.