I’m upgrading from the old viewer to the new CMV version.
Is there a better way for handling a content pane in the sidebar under the new format? In the previous version I did it thru the controller, but this seems to be against the best practices of the new CMV. Any suggestions?
This is what I was doing: (Last portion of the posted code from Controller.js creates the content pane pictured below circled in red and adds it to the 5th position.)
Controller.js
initWidgets: function(evt) {
var widgets = [];
for (var key in config.widgets) {
if (config.widgets.hasOwnProperty(key)) {
var widget = lang.clone(config.widgets[key]);
if (widget.include) {
widget.position = ('undefined' !== typeof(widget.position)) ? widget.position : 10000;
widgets.push(widget);
}
}
}
widgets.sort(function(a, b) {
return a.position - b.position;
});
array.forEach(widgets, function(widget, i) {
this.widgetLoader(widget, i);
}, this);
var wcCP = new ContentPane({
content: "</br><a href='#' onclick=window.open('http://oilandgas.ohiodnr.gov/')><center><img src='https://gis.ohiodnr.gov/website/oit/OilGasJS_Test/images/DOGlogo_75.png'></center></a></br><center><b>Divison of Oil & Gas</b></br>2045 Morse Rd</br>Columbus, OH 43229</br>614-265-6922</br><a href='mailto:[email protected]'>[email protected]</a></br><a href='#' onclick=window.open('http://oilandgas.ohiodnr.gov/')>ODNR Oil & Gas Website</a></br></br></br>Download GIS Oil & Gas Well Data:</br><a href='#' onclick=window.open('https://gis.ohiodnr.gov/website/oit/OilGasJS_Test/widgetid_help_content_data2.html')>Download Well Data by County</a></center>"
}).placeAt(this.sidebar, 5);
},