How to make mootree follow links on adopt?

20 views
Skip to first unread message

guillem

unread,
Apr 16, 2009, 3:19:50 AM4/16/09
to mootree
Hi guys,

I would like to have :

<div class="mooTree_text"><a href="here_my_link.html">my page</a></
div>

instead of

<div class="mooTree_text">my page</div>

while mootree is adopting an existing list (sitemap).


For now, i'm using the onSelect option to follow my links:

var tree;

window.onload = function() {

tree = new MooTreeControl({
div: 'mytree',

select: 'sitemap',
theme: '<?php bloginfo('template_url'); ?>/img/mootree.gif',
onSelect: function(node, state) {
if(node.data.href) {
document.location = node.data.href;
}
}
},{
text: 'Table des matières',
open: true
});
tree.adopt('sitemap');

}

But, it would be better to inject "a" markup.
I read the documentation but i can't figure out how to do it.

Thanks for you help
(and sorry for the crappy english ^^)
Reply all
Reply to author
Forward
0 new messages