Hi I have a couple of snippets that i'd like to convert to work in Revo and don't know how.
I have a Reflect snippet like this:
[!Reflect?config=`wordpress` &targetID=`99` &getDocuments=`1` &dittoSnippetParameters=`parents:61`&id=`wp`!]
The ditto snippet has been replaced with pdoResources so it should work with a little tweaking.
I have another snippet that lists blog categories from a resource's content area. That looks like this:
<?php
// snippet to build menu based on multiple categories contained
// in a document
// ID for target landing page
$target = '61';
// Document id for source of menu
$sourceid = 68;
// tpl for the output
$tpl = '<li><a href="[[+url]]" title="[[+category]]">[[+category]]</a></li>';
// get input value options from the source document
$doc = $modx->getDocumentObject('id', $sourceid);
$list = $doc['content'];
$catVal= str_replace("\r\n", "||", $list);
// make array from catVal
$catArray = explode('||', $catVal);
// build target link
$targetUrl = $modx->makeUrl($target).'?tags=';
//iterate through the array and build the menu
foreach($catArray as $c){
$cTag = urlencode($c);
$tagLink = $targetUrl.$cTag;
// parse tpl
$tplOut = str_replace('[[+url]]', $tagLink, $tpl);
$tplOut = str_replace('[[+category]]', $c, $tplOut);
echo $tplOut;
}
Any pointers much appreciated.