Author: "dotcms"

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

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

How to Display Content Type's Fields

On this example we will show how to use Velocity to display the values for each type of field on a content type.

We created a new structure and...

One liner for generating OSGi fragment export

When developing an OSGI plugin, you often (always) need to generate an OSGi "fragment" which takes the place of manually having to change the osgi-exports...

Show different WYSIWYG options based on Role

It is easy to show different WYSIWYG options based on a users role.  All you need to do is to write a plugin that overrides the file:


Navigation Macro based on dotCMS' navTool viewtool

This macro extends the functionality provided by dotCMS' navTool viewtool.

It is based on folders and will allow you to set a starting point...

Displaying Hints on Form Fields

If you want to display a hint for each of your Form fields you can do so by using the following Javascript snipet.

This example uses the Form's...

Comparing Dates in Velocity

This code sample will help you learn different ways to obtain today's date and format it. It also shows how you can compare two dates, or one content...

Using AND and OR to pull content by Categories

When pulling content by categories sometimes you need to match categories using an AND, or an OR or sometimes a combination of both.

The example...

Pulling Content using RESTful ContentAPI

This example shows how to pull content from an external dotCMS site using the ContentAPI and displays the results paginated.

Adding Categories to Content when Calling Checkin

The code below can be used to add a category by key to a contentlet when calling the checkin method.

Creating a List of Maps and adding to Session

This codeshare shows how to create a List of Maps of Strings, and to "set" and "get" the List on an attribute in the HTTP Session.

Parsing a JSON String using Jquery and Velocity

If you have a field on a content type that stores a JSON string, you can parse the string using a combination of Velocity and JQuery.

JQuery ...

Script to Remotely Deploy OSGI jar

This is a bash script that will allow you to remotely deploy an OSGi plugin via the command line.  This is helpful when developing remotely

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

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

Set Language by Site or Folder

dotCMS supports a robust set of multi-lingual features that can be used anywhere on sites served by dotcms by passing a url parameter -


Pulling Related Host Specific Content excluding Global Content

This example allows you to pull related content on a specific host without including global content that is assigned to System Host.

When using...

Displaying Metadata values from a File Content Type

When a new file is uploaded dotCMS extracts its metadata and indexes it for searches or to be displayed.

This sample shows how to take a list...