Hi neilcreek,
All you need is the ’introtext’ snippet for your suggestion to work
If you’re pulling from a single page to display on another page, then the following snippet should work:
/**
* Snippet: Get info from another page
*
*/
$id = (isset($id) && is_numeric($id)) ? $id : false;
$field = (isset($field)) ? $field : false;
if (!$id || !$field) {
return '';
} else {
$output = $modx->getPageInfo($id,1,$field);
}
return $output[$field];
You can call the snippet like this (assuming you call it ’introtext’):
[!introtext? &id=`5` &field=`introtext`!]
You may have guessed, you can use the snippet to pull other content fields ... for example, pagetitle or description. Just set the field parameter to the field you want to retrieve.
Hope that helps,
Garry