RESTful Widget API

Through the use of the RESTful widget API, dotCMS supports calling widgets between different servers. These widgets can be used to supply code fragements that can rendered from the server side or even throguh JavaScript For example, if Site A needs to display a widget that exists on Site B, then the webmaster administering Site A can use the RESTful widget api to call the "remote widget" on Site B and dynamically display Site B content.

Example

This code pulls the Youtube Widget from the demo site.

JavaScript Code

<div id="movieDiv"></div>
<script>
    $(function(){
        $('#movieDiv').load('/api/widget/id/ec77907a-2b7c-4356-ad8d-9d8a9bbdb252');
    });
</script>
Powered by dotCMS - The Leading Open Source Java Content Management System