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

Recent Submissions

Bash Script to rebuild dotCMS index

Created: Jun 08, 2020

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

Created: Apr 14, 2020

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

Gatsby JS and dotCMS GraphQL - Pulling Relationships

Created: Feb 03, 2020

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

Created: Jan 05, 2020

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 | Created: Dec 10, 2019

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

Importing Content from Confluence

Created: Apr 16, 2019

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

Multiple loops in a container

Author: Jason Smith | Created: Sep 13, 2018

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.

Using Velocity as a REST Endpont

Created: Aug 12, 2018

In the course of business, it is inevitable that you might require a custom REST endpoint that delivers content in a particular format or even to deliver...

Configuring Tomcat with HTTP2 - a dotCMS example

Author: dotCMS | Created: Jul 24, 2018

dotCMS 5.0 ships with Tomcat 8.5 which supports the HTTP2 protocol. HTTP2 is a modern version of HTTP that can combine multiple requests into a single...

Quick and Easy Star Ratings

Created: May 10, 2018

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