Recent Submissions

Multiple loops in a container

Several HTML frameworks require you to spit out your content in multiple chucks. For example, the tabs component in the Foundation CSS framework wants...

Using Velocity as a REST Endpont

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

Get Geolocation Data by IP Address

Use the following code to get geolocation data by IP Address of the visitor. You can use this page in a widget, vtl file, container, template, etc.

dotCMS-Inspector version 3.x

This is a simple tool to gather information about a running dotcms instance. This only works with dotcms 3.0 plus.

Usage: Must be run as root...

dotCMS-inspector version 2.x

This is a simple tool to gather information about a running dotcms instance. This only works with dotcms 2.x releases

Usage: Must be run as root...

2018 Tomcat SSL Certificate installation

Easy installation of a signed SSL cert with dotCMS and tomcat

Quartz Errors

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

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

Workaround for maximum 25 data types

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

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

It is often useful or required to use https rather than http in order to do development browser testing.  Most modern 3rd party js libs require...

Show a page and content as JSON

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

Generate responsive image tag from image file path

This code allows you to generate a responsive image tag that uses "srcset" and "sizes" attributes using a file location on your dotCMS server (ie. "/path/to/myfile...

Creating a multi domain letsencrypt cert for dotcms on AWS Linux

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

Running dotCMS Behind Reverse-proxy Web Server

This document explains how to set up dotCMS to run behind a reverse proxy web server. There are a multitude of reason why you might want to do this:...

Export to Word - OSGI/Dynamic Plugin

'Export to Word' plugin allow users to export online content into Word Processing document using Aspose.Words for Java. It dynamically exports the content...

Alphabetical listing of images in a folder, using folder path

This is an alternative to the old, deprecated "#photoGallery" macro

Select Field for Frontend REST Forms

The following snippet allows you to add a Select field to a Frontend Form that works with Content REST API. 

  • There are...

WYSIWYG Field for Frontend REST Forms

The following snippet allows you to add a WYSIWYG field to a Frontend Form that works with Content REST API. 

  • The $!{wysiwygField}...

Ace Editor Custom Field

The Ace text editor is an online code editor written in JavaScript. It matches the features and performance of native editors.

This code example...

Bash Installation Script for dotCMS

This bash script will automatically download and install dotCMS. It was made to work, and tested on CentOS 7. This is not intended to be used on production...