Login Register

Get content before rendering

I have a template that takes:

<div title="The standard Lorem Ipsum passage, used since the 1500s">
"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
</div>

and

I want to get the content of the div and make a template like:

<div class="MyWidget">
<h2>${title}</h2>
<div>${content here please}</div>
</div>

where ${content here please} should be the paragraph. How do I get to the paragraph if it doesn't have an ID before the template system removes it?

You should be able to make

You should be able to make your template like this:

<div class="MyWidget">
<h2>${title}</h2>
<div dojoAttachPoint="containerNode"></div>
</div>

The dojoAttachPoint value set to "containerNode" basically means "put all the content from the original node into this node"