![]()
Today we continue our series of Dojo Tutorials with a look at creating Template-based Widgets!
Events, Variables, Attach Points and more
In this tutorial, you’ll learn about the importance of Dijit’s _Templated mixin, and how to use templates to quickly create your own custom widgets.
Check it out!
Want to learn more? Check out the tutorial.
Want to see a specific Tutorial? Want to Learn More?
Is there something you’d like to learn how to do with Dojo? Always wanted to know how something in Dojo works? Leave us a message in the blog comments and we’ll see about getting a tutorial created for you. Or sign-up for an upcoming SitePen Dojo Workshop to get a fully immersive hands-on experience with Dojo.

Thanks for the tutorial. One thing I would like to note to everyone is that when you have widgets in your template, you need to be sure to define the widget’s properties either programmatically, or using the data-dojo-props attribute. If you define them declaratively (for example, adding the regExp property to a ValidationTextBox input) they will not be there when you test your application. It also applies to some widgets that use properties defined in the HTML specification, like the “name” property on a radio button (using dijit.form.RadioButton). You will have to put that in data-dojo-props. You can read more about this here: http://docs.dojocampus.org/releasenotes/1.6#parser I learned this the hard way, so I hope I can save someone trouble.