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

Author: "dotCMS"

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

Quartz Errors

Author: dotCMS | Created: Aug 11, 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: Apr 30, 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 07, 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 28, 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 13, 2014

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

Show different WYSIWYG options based on Role

Author: dotCMS | Created: Jul 08, 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 02, 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 09, 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 09, 2013

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