could this only be in the document content? Say I want it in a sidebar. Should that be done through a TV?
In this case you will not need a snippet like that. Instead you would simply insert the {{AdSense}} call into your template.
is there an alternative to this nice snippet, for revolution?
can be converted?
edit: done
$where = 1; //insert chunk after # </p>
$content = $modx->resource->content;
$content = explode('</p>', $content);
for ($i = 0; $i<count($content); $i++){
if ($i == $where) {
echo $modx->getChunk('AdSense');
}
echo $content[$i] . '</p>';
}
[ed. note: banzai last edited this post 13 years, 2 months ago.]