Never mind, I found it. function showContent(kml) { var tfeatureInfos = kml.folders[0].featureInfos; dojo.forEach(tfeatureInfos,function(info){ var tfeature = kml.getFeature(info); var tName = tfeature.name; var tDescription = tfeature.description; var node = dojo.create('div', { innerHTML: tName + '<p>' + tDescription + '</p>' }, dojo.byId("contents")); }); var featureInfos = kml.folders[1].featureInfos; dojo.forEach(featureInfos,function(info){ var feature = kml.getFeature(info); var Name = feature.name; var Description = feature.description; var checkBox = new dijit.form.CheckBox({ name: "checkBox", value: feature.id, checked: false, onChange: function(evt) { if (this.checked==false) { kml.setFolderVisibility(feature,false); } else { kml.setFolderVisibility(feature,true); } } }); //add the check box and label to the toc dojo.place(checkBox.domNode,dojo.byId("layers"),"before"); var checkLabel = dojo.create('label',{'for':checkBox.name, innerHTML:' ' + Name},checkBox.domNode,"after"); dojo.place("<br />",checkLabel,"after"); }); }