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

Recent Submissions

Mobile Detection and Redirection part 2

Author: dotCMS |

Simple mobile detection and redirection in dotCMS

Twitter4J Viewtool Example

Author: Christopher Falzone |

Just a quick Example of a Twitter4J viewtool.

Auto-scroll to top of page

Author: Kivi Shapiro |

The home page for one of our sites was loading a lot of content into various containers, much of which was created on the fly by vtl.

Tag cloud by Structure and Categories

Author: Greg Jordan |

Tag cloud by Structure and Categories

Checking Load Times of Individual Components in a Page

Author: Jeremiah Weeden-Wright |

We recently have been trying to find components (widgets/parsed vtls/containers) that are taking too long to load and could use optimization.

Adding Categories to Content when Calling Checkin

Author: Dotcms |

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

Mobile Detection and Redirection

Author: Christopher Falzone |

Simple mobile detection and redirection in dotCMS

Publish a Static Copy of Your Site

Author: dotCMS |

his is a very simple bash script that demonstrates how one can use the timemachine functionality built into dotCMS to maintain a static copy of your site...

Password Custom Field

Author: Dotcms |

The following code can be used to add a Password field to a content structure, including a Form.

Sample Google Calendar API fetch

Author: Mark Pitely |

A working copy of a JSON fetch from the Google Calendar API.