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

Author: "Christopher Falzone"

Multi-lingual Navigation

Author: Christopher Falzone | Created: Feb 08, 2015

Here is an example of how to do multi-lingual navigation using the navtool. You need to have your language keys set up and then make each page title a ...

Date Looping

Author: Christopher Falzone | Created: Jun 17, 2013

This is how you can loop over a range of dates in velocity

Twitter4J Viewtool Example

Author: Christopher Falzone | Created: Apr 09, 2013

Just a quick Example of a Twitter4J viewtool.

Mobile Detection and Redirection

Author: Christopher Falzone | Created: Apr 02, 2013

Simple mobile detection and redirection in dotCMS

simple mailer with encoding (charset) support

Author: Ati Rosselet | Created: Oct 24, 2012

update for the included mailer ViewTool, allowing user to set character encoding, allowing accented and foreign characters in html mail.

1.9 Orphaned htmlpage SQL

Author: Chris Falzone | Created: Sep 26, 2012

From time-to-time we still have clients come to us with orphaned files. Here are the queries I use to find/fix them.

Disable Structure Fields in Back-end UI

Author: Jonathan Laughlin | Created: Jun 10, 2012

This javascript, when placed into a custom field, will disable fields listed in the array fieldsToDisable. making them uneditable by back-end UI users.

Import Content (ContentletAPI Example)

Author: Chris Falzone | Created: Jun 07, 2012

From Chris Falzone - an example of importing content in dotCMS 1.7 using the ContentletAPI

Generate A Random Number with Limits

Author: Chris Falzone | Created: Mar 04, 2012

This simple snippet generates a random number between 1 and 5

Change the Page Title and Crumbtrail Title based on URLMapContent

Author: Brent Verkerk & Chris Falzone | Created: Feb 08, 2012

See how to check for URLMapContent in your Template, and change the page title and crumb-trail title accordingly.