Copy link to clipboard
Copied
We have to put extension version information into the manifest.xml file. Is there a way to access this programmatically from within panel extensions or would it require loading and parsing the XML directly?
Copy link to clipboard
Copied
Probably need refinement (extension id per say) but here is a starting point. It consists in loading the manifest as XML file and read the version value:
var xmlDoc = new window.XMLHttpRequest();
var xmlFilePath = csInterface.getSystemPath(SystemPath.EXTENSION)+"/CSXS/manifest.xml";
xmlDoc.open("GET",xmlFilePath,false);
xmlDoc.send("");
xmlDoc = xmlDoc.responseXML;
var ext = xmlDoc.getElementsByTagName('Extension')[0];
var version = ext.getAttribute ("Version");
HTH
Loic