Dotcontent Viewtool

Last Updated: Aug 20, 2021
documentation for the dotCMS Content Management System

The $dotcontent Velocity Viewtool is used to pull individual content items or lists of content from the content repository via Velocity, using Lucene queries.


There are many different methods to pull content using the $dotcontent tool. For more information, on each method, please click the links below:

MethodReturn TypeContent Returned
$dotcontent.pull()List of content objectsAll content which matches the specified Lucene query
$dotcontent.pullPerPage()List of content objectsAll content matching the specified query, paginated
$dotcontent.pullRelated()List of content objectsRelated content matching the specified parameters
$dotcontent.pullPersonalized()List of content objectsContent matching the specified parameters, personalized for individual users
$dotcontent.find()Single content objectAn individual content item specified by identifier

Content Limit on Pull

For all pull methods the default limit is 100,000 pieces of content, but that can be overwritten using a few techniques

Bypass Pagination

To see as many content items as you would like above 10,00 without pagination we would use the Scroll API to get the entire list of elements by calling:

With this you set the second parameter to anything above 10K like in this example we passed 10001.

## Toolbox.xml Configuration {#ToolboxXml}

The following example shows how the dotcontent Viewtool is mapped in the [toolbox.xml](toolbox-xml) file:
<!--## References {#References}

* <a href="/docs/javadocs/latest/com/dotcms/rendering/velocity/viewtools/content/ContentTool.html" target="_blank">ContentTool Javadocs</a>

On this page


We Dig Feedback

Selected excerpt: