Editing Pulled Content

Last Updated: Jun 8, 2021
documentation for the dotCMS Content Management System

Webmasters can enable content contributors to edit pulled content directly from the page it's displayed on. This speeds up content review and editing since contributors do not have to search for the displayed content to make changes. There are two ways to do this:

Display Edit Button on Dynamic Content

The #editContentlet() macro creates an edit icon with a link to edit a contentlet being dynamically displayed from a content pull.

Macro Overview:

Syntax:

#editContentlet(inode)

Arguments:

  • inode: The inode of the contentlet to edit.

Optional Parameters:

None.

Usage:

Place this macro immediately after a foreach loop so that content editors can edit each contentlet displayed by the content pull.

Example:

A simple example using the required fields:

#foreach($con in $dotcontent.pull("+contentType:News +(conhost:48190c8c-42c4-46af-8d1a-0cd5db894797 conhost:SYSTEM_HOST)",10,"News.title"))
    #editContentlet($con.inode)
    $con.title
#end

On this page

×

We Dig Feedback

Selected excerpt:

×