Quote from: BobRay at Feb 24, 2009, 01:15 PM
Quote from: Everett at Feb 24, 2009, 10:44 AM
Looks like you need to return the output from your Snippet. I think Bob may have left that part out...
I didn’t, but he did. 
You have to scroll down to see all the code in my snippet example above, you left out this crucial line at the end of the snippet:
return($modx->getChunk('MyTplChunk');
That was a miss! Thanks for pointing that out Bob.
It still doesn’t work for me with your last line of code. But, it does work when I try Everett’s test of
Here is my snippet again:
<?php
$id = $pageId; // sent in snippet call
$fields = 'longtitle,content'; // fields we want
$active = 1; // we want published docs
$info = $modx->getPageInfo($id, $active, $fields);
$longTitle = $info['longtitle'];
$docContent = $info['content'];
$modx->setPlaceholder('tipTitle',$longTitle);
$modx->setPlaceholder('tipContent',$docContent);
return($modx->getChunk('getFieldsTemplate');
//return 'Testing...';
?>
Here is my Chunk:
<h2>[+tipTitle+]</h2>
<p>[+tipContent+]</p>
and here is my call:
[!getFields?&tpl=`getFieldsTemplate`&pageId=`108`!]