- Documentation topics on: .

Recent Submissions

Tag cloud by Structure and Categories

Tag cloud by Structure and Categories

Mobile Detection and Redirection

Simple mobile detection and redirection in dotCMS

Adding Categories to Content when Calling Checkin

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

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

Password Custom Field

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

Take the following steps to add a Password /...

Sample Google Calendar API fetch

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

 

The most useful resource/page I found was here - it allows you to...

Custom Field - Hiding a Tab based on host

This code is an example of how you can get the host id that a content editor is on, and based on that host ID it will show or hide a tab in the content...

Multi-select custom field

This builds on the codeshare Stephen Bell provided for using a custom field with a select. This uses a multi-select and reads back in multiple values...

Pull a dropdown list (select) of other content into a custom field

Use this code in a custom field, to pull a list of other content into a select field. This code uses the jQuery Javascript library in a way that shouldn't...

Listing Request Attributes

The following code can be used on your site to list all the attributes and values stored in the Request object. It's wrapped with a condition to only...

Display Related Content Listed by Categories in a Multilingual Environment

Sometimes you want to display related content listed and classified by category in a multilingual environment.

FileAsset Creation using the ContentletAPI

This is a very straightforward demonstration JSP that will transactionally checking a FileAsset content using the 2.2 starter site content schema.  ...

Pull Nested Child Categories by Parent Category Key

Use this example to create dynamic parent/child category listings.  The category listings can then become clickable listings to filter content ...

Internal Navigation link fix-option

Replacement for NavigationWebAPI.java in 2.2 branch (works for 2.5 too). Handles problem (if its a problem for you) where internal links are not relative...

Dynamic File Cachebuster Variables

There are times where you might want to add a dynamic variable to the end of a file to help browsers repull the file after changes have been made to...

How to Copy a Contentlet using Velocity

This example shows how to use the ContentletAPI to find a Contentlet by a given inode and then copy it. Other methods from the ContentletAPI can also...

Conditionalized Structure Fields

This javascript code can be used in a custom field as an example of making fields (in this case "Featured Start" and "Featured End") visible conditionally...

simple mailer with encoding (charset) support

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

fully...

Getting the page context values

This will echo out all the Velocity variables set in the given page's context.

How to Display Content Type's Fields

On this example we will show how to use Velocity to display the values for each type of field on a content type.

We created a new structure and...