I have a set of biogs on pages. I want to republish the [*content*] of an individual biog on another page, elsewhere.
What’s the quickest way of doing this? is it a job for ditto or is there another way of doing this?
Thanks for any help
Jim
Ditto if it’s more than one. the getfield snippet would work if it’s just one page -
http://modxcms.com/getField-667.html
-
☆ A M B ☆
- 24,524 Posts
You can also use a TV with @DOCUMENT <docid>
Does @DOCUMENT just get the [*content*] field?
-
☆ A M B ☆
- 24,524 Posts
Just the raw unparsed content field. The getDocument() function calls the getDocuments() function, which checks for access permissions before returning an array of the document fields requested.
case "DOCUMENT" : // retrieve a document and process it's content
$rs = $modx->getDocument($param);
if (is_array($rs))
$output = $rs['content'];
else
$output = "Unable to locate document $param";
break;
Thanks for looking that one up Susan.
You can also use the GetField snippet.
You don’t have to use the Modx Resource Wizard - it’s optional. Just upload assets/snippets/getfield/getfield.inc.php + create a new snippet in Resources > manage resources > snippets