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

Author: "DotCMS"

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

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

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

Set Language by Site or Folder

Author: dotCMS Team | Created: Jan 08, 2015

Using a variable to set the language rather than the folder or site has the benefit of allowing a multi-lingual site to maintain a single information architecture...

One liner for generating OSGi fragment export

Author: dotCMS | Created: Oct 29, 2014

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

Navigation Macro based on dotCMS' navTool viewtool

Author: DotCMS | Created: Aug 14, 2014

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

Show different WYSIWYG options based on Role

Author: dotCMS | Created: Jul 09, 2014

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:

Ace Editor Custom Field

Author: dotcms | Created: Jul 03, 2014

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

Script to Remotely Deploy OSGI jar

Author: dotcms | Created: Mar 10, 2014

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

Insert 500 Contents for Testing

Author: dotCMS | Created: Jun 10, 2013

This .jsp script will insert 500 pieces of content, which is a valid test for system performance.