Hi,
I want to Use Destroy Tree as site menu, Destroy Tree has codes below:
<script type="text/javascript">
<!--
d = new dTree('d');
d.add( docId , parentId , title , link );
document.write(d);
//-->
</script>
I want to create the line d.add(.... with wayfinder but i have problem:
I couldn’t find anything to get the parent id so i decided to use this codes:
$parent = $modx->getParent($modx->documentIdentifier);
and created rowTpl like below:
d.add( [+wf.docid+] , parent id , '[+wf.title+]', '[+wf.link+]' );
so i need to mix these codes to work together at same time, something like this:
$parent = $modx->getParent( [+wf.docid+] );
d.add( [+wf.docid+] , $parent['id'] , '[+wf.title+]', '[+wf.link+]' );
but you know that this codes never works and if values were correct, output is between <ul> and </ul> that make js codes not work.
would someone help me to solve it?
Thanks
AHHP