Load Individual Content from Identifier or Inode — $dotcontent.find

Last Updated: Dec 13, 2024
documentation for the dotCMS Content Management System

Overview

The $dotcontent.find tool will take an identifier or inode of a piece of content and return just the ContentMap object. This method is preferred over querying for the content because the the correct content is retrieved directly from cache, rather than hitting the index.

Syntax

$dotcontent.find(contentIdentifier)

Arguments

This method takes only a single content identifier as an argument.

Usage

A simple example using the required fields

#set($id = $request.getParameter("id"))  
#if($id)  
  #set($content = $dotcontent.find($id))  
My title is $content.title  
#end

On this page

×

We Dig Feedback

Selected excerpt:

×