-
- 178 Posts
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
-
- 898 Posts
Ditto if it’s more than one. the getfield snippet would work if it’s just one page -
http://modxcms.com/getField-667.html
You can also use a TV with @DOCUMENT <docid>
-
- 898 Posts
Does @DOCUMENT just get the [*content*] field?
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;
-
- 898 Posts
Thanks for looking that one up Susan.
-
- 4,205 Posts
You can also use the GetField snippet.
-
- 956 Posts
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