Codeshare List of user-contributed code snippets for dotCMS Java CMS.

Recent Submissions

Quartz Errors

Author: dotCMS |

If you are seeing errors like this after an upgrade, it means that quartz has serialized an object to the database in its job store that has changed between...

Bash Script to rebuild dotCMS index

This is a down and dirty bash script that forces dotCMS to do a full reindex. This really should be done as a restful endpoint in dotCMS but until we ...

SiteSearch REST API

A VTL API that serves site search results as a REST endpoint

Gatsby JS and dotCMS GraphQL - Pulling Relationships

The attached video shows how you can use Gatsby JS's graphql plugin to pull content and content relationships (graphs of content) from dotCMS.

Delivering HTML, markdown or raw text via API

You can use dotCMS's scripting API to deliver custom renditions of content, including content where HTML has been stripped out or the content is markdown...

Custom Field: Linking to different Content

Author: Daniel Patterson |

A custom field that pops a browser and allows you to select and style a link.

Importing Content from Confluence

Using dotCMS Scripting APIs, learn how you can import rendered content from Confluence

Multiple loops in a container

Author: Jason Smith |

Create two lists from one content pull to display content in multiple sections of the HTML page. Easily place spit-out your content in multiple chucks.

Quick and Easy Star Ratings

A quick and easy way to create javascript star ratings in dotCMS.

Emergency! Restoring a deleted piece of content

If you delete a folder, all content under that folder gets destroyed - which means in dotCMS lingo that it is removed from the db and the /assets folder...