Is it possible to display the [*content*] of lets say page id 1 on page 2 by a call along the lines of [*id=1*content*] ? Is this possible? Obviously this suggested way does not work ;]
I am looking for a way to have content referred to on other pages - I know this is possible with TVs but want to do it with the [*content*] as well? Can it be done?
Thanks
dubbs
Create a new snippet with the code below, call it in your page where you want the content to appear:
<?php
/* get_content snippet
[!get_content? &getid=`2`!]
*/
$grab_id = isset($getid) ? intval($getid) : '';
$output ='';
$sql = 'SELECT content FROM '.$modx->getFullTableName( "site_content" ).' WHERE id="'.$grab_id.'"';
$result = $this->dbQuery($sql);
$resource = $this->fetchRow($result);
$output .=$resource['content'];
return $output;
?>
Sorry, had to remove the "2" from the $resource = $this->fetchRow($result); part
Fab - thanks guys will have a look into these!
Breezer - works a dream! ta