Using the Widget API


Since dotCMS 2.1 we provide an API to render a Widget based on its identifier.

This example shows how to use the api to pull a Widget from another dotCMS installation and render it on your site. 

It pulls the Local Weather from the Demo site and displays it like this:



#set($myStr =$""))

Have you created code you'd like to share with the dotCMS community?

Share your code Become a Contributor