Author: "Christopher Falzone"

Multi-lingual Navigation

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

Date Looping

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

Twitter4J Viewtool Example

Just a quick Example of a Twitter4J viewtool.

Mobile Detection and Redirection

Simple mobile detection and redirection in dotCMS

1.9 Orphaned htmlpage SQL

I know 1.9 is quickly becoming obsolete, and that 2.0 really solves the whole orphaned file issue.  However, from time-to-time ...

Import Content (ContentletAPI Example)

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

Generate A Random Number with Limits

This simple snippet generates a random number between 1 and 5

Dynamic Content Anchors

This snippet creates Anchor Tags and a navigation links for each contentlet in a container.  The idea being that as content is added to the container...

Disable Crawler Traffic

The following snippet is a urlRewrite rule to disable traffic from a crawler.  Just replace crawleragent with the User Agent of the crawler. The...

Display a list of Items in a folder

This snippet shows how to the use the macro viewtool's fileRepository method to build a list of files and folders in a folder.  This is the same...

Change the Page Title and Crumbtrail Title based on URLMapContent

This snippet shows how to check for URLMapContent in your Template, and change the page title and crumbtrail title accordingly.  

If you...

Disable Structure Fields in Back-end UI

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