Login Register

Problem with templateString of dijit.tree and TreeNodes

Hi,

right now I'm totally lost with 2 Problems with dijit.Tree and templating.

Problem 1:
I already managed to modify the template String of my dijit.Tree. But how do I modify the template String of the TreeNodes?

right now I got:

<code>
var sitemap=new dijit.Tree({
   id:'sitemap',
   store:sitemapStore,
   query:{top:true},
   templateString:"someHTMLstuff"
  }
   ,dojo.byId("sitemap"));
</code>
but this only modifies the Tree container, not the template of the tree nodes.
I'm looking for something like:
<code>
   sitemap._TreeNode.templateString="sometemplateHTML"
</code>
any ideas?!?!?

Problem 2:
I want to include custom attributes of my treeNodes in the template but don't know how to do that :-(.

Most of my JSON nodes look like this
<code>
{ id: '6cbfcac1:11c8d133ff7:-a40', title: 'Top Stories', description: 'Top News about XYZ', link: "http://www.google.de" }
</code>
now I'm trying to get the description displayed in the final tree and use the link as HREF of the title.

Any Ideas about that? I'm really lost with the dojo template syntax :-(

I'd be very happy if any of you could help me out with even the smalest hints regarding my problems!!

Nils