Developers Knowledge Base

Learn how to manipulate, modify, and tune your GeoMedia WebMap, Geospatial Portal and Consumer portal instances.
Showing results for 
Search instead for 
Do you mean 

Registering Custom Template in the AdminPortal

by Technical Evangelist on ‎10-15-2015 06:48 AM - edited on ‎04-06-2017 04:12 AM by Technical Evangelist (819 Views)

By default the AdminPortal doesn't know about your custom portal type (like CustomPortal) created with the MSBuild script (or manually). To be able to send workspaces from the AdminPortal to your custom portal directly, the AdminPortal needs to learn about the new type. To do it, we are going to edit its JavaScript file.

 

Edit the file:

 

"C:\Program Files\Common Files\Hexagon\Services\AdminInstances\AdminPortal\js\MapConfig.js"

And make sure that it contains the following code. It needs to be added just once, for more templates we are going just to update the this._instancesDefaultTypes array:

Sys.Application.add_init(function () {
    var orig= Intergraph.WebSolutions.Core.WebClient.Controls.Instances.InstancesControl.prototype.initialize;
    Intergraph.WebSolutions.Core.WebClient.Controls.Instances.InstancesControl.prototype.initialize = function () {
        orig.apply(this, Array.prototype.slice.call(arguments));
        this._instancesDefaultTypes= this._instancesDefaultTypes.concat(["CustomPortal", "<Your Custom Template's Name>"]);
    };
});
Overview