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

Recent Submissions

Multiple loops in a container

Author: Jason Smith | Created: Sep 14, 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 13, 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 25, 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 11, 2018

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

Quartz Errors

Author: dotCMS | Created: Aug 12, 2017

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

Emergency! Restoring a deleted piece of content

Created: Aug 02, 2017

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

https from the command line - quickly set up a openssl proxy for testing

Created: May 17, 2017

It is often useful or required to use https rather than http in order to do development browser testing.

Workaround for maximum 25 data types

Author: Nollymar Longa | Created: May 11, 2017

The idea is to create additional fields using a custom field and save their values as a JSON object into the custom field.

Show a page and content as JSON

Author: dotCMS | Created: May 01, 2017

This code allows you to display the page information, template information and content on the page as a json object. If you add this to the top of your...

Creating a multi domain letsencrypt cert for dotcms on AWS Linux

Created: Feb 17, 2017

The script below outlines how to generate and use a letsencrypt cert with dotCMS running from tomcat on AWS linux