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

Author: "dotcms"

Quartz Errors

Author: dotCMS |

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 |

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 |

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 |

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 |

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

Show different WYSIWYG options based on Role

Author: dotCMS |

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:

Script to Remotely Deploy OSGI jar

Author: dotcms |

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

Mobile Detection and Redirection part 2

Author: dotCMS |

Simple mobile detection and redirection in dotCMS

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.

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