Login Register

templateString

some advices for dojo: why templateString/templatePath doesn't support inheritance like Struts Tiles.

I think it would be better if dijit's templateString/templatePath can support inheritance like Struts Tiles.

1. Use a JSON file to store template string(s).
2. Add a parent property in it.
3. If like this, it is possible that save all template string(s) in one JSON file to reduce the counts of HTTP request.

For example, a JSON file maybe like below:
{
templateParent = {parent: null, layout: "<div><h1></h1>Hello,<div>$(area)</div></div>"},

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:

Long one-line template strings

Is there a reason why some long templateString's are listed on a single line? Would it be possible to break them into multiple lines? It's rather annoying to check a template string if you have to scroll horizontally several hundred columns.

Is it possible to use declarative markup in a template made of just dojo widgets and get it parsed?

Is it possible to use declarative markup in a template that is just constructed of dojo widgets. I've found dojo.parse.parser(element); that will scan all the child contents of the that domNode and create the widgets but it doesn't work if the element passed is itself a widget? Any suggestions? Trying to use just dojo widgets and not apply anything but positioning to them to take advantage of all the support built into them.


// template file source

Syndicate content