Hello,
I am developping a custom InfoWindow where I show multiple features popupTemplate inside one. However, I am looking for a way to get the content of a feature popupTemplate programmatically.
I have tried to access the content property of the popupTemplate which is a function, but it returns a node element that is not populated with the feature data.
feature.setInfoTemplate(layer.infoTemplate);
feature.infoTemplate.content().innerHTML;
"<div class=\"statusSection hidden\" dojoattachpoint=\"_status\"></div><div class=\"mainSection\"><div class=\"header\" dojoattachpoint=\"_title\"></div><div class=\"hzLine\"></div><div dojoattachpoint=\"_description\"></div><div class=\"break\"></div></div><div class=\"attachmentsSection hidden\"><div>Attachments:</div><ul dojoattachpoint=\"_attachmentsList\"></ul><div class=\"break\"></div></div><div class=\"mediaSection hidden\"><div class=\"header\" dojoattachpoint=\"_mediaTitle\"></div><div class=\"hzLine\"></div><div class=\"caption\" dojoattachpoint=\"_mediaCaption\"></div><div class=\"gallery\" dojoattachpoint=\"_gallery\"><div class=\"mediaHandle prev\" dojoattachpoint=\"_prevMedia\" dojoattachevent=\"onclick: _goToPrevMedia\"></div><div class=\"mediaHandle next\" dojoattachpoint=\"_nextMedia\" dojoattachevent=\"onclick: _goToNextMedia\"></div><ul class=\"summary\"><li class=\"image mediaCount hidden\" dojoattachpoint=\"_imageCount\">0</li><li class=\"image mediaIcon hidden\"></li><li class=\"chart mediaCount hidden\" dojoattachpoint=\"_chartCount\">0</li><li class=\"chart mediaIcon hidden\"></li></ul><div class=\"frame\" dojoattachpoint=\"_mediaFrame\"></div></div></div><div class=\"editSummarySection hidden\" dojoattachpoint=\"_editSummarySection\"><div class=\"break\"></div><div class=\"break hidden\" dojoattachpoint=\"_mediaBreak\"></div><div class=\"editSummary\" dojoattachpoint=\"_editSummary\"></div></div>"
What I would need is the content only with the attributes names and values as defined in Portal. Is there a way to achieve that?