Client Input Form API for Input Controls

There are a series of method calls that are available which allow you to pull Agility content within your input form. The following are the currently supported methods that can be accessed using the JavaScript API that is referenced on every content input form within the Agility Content Manager.

GetAttachments
Method used to get List of Attachment Objects (similar to Agilty.Web method)
Agility.CMS.API.GetAttachments(ContentItemID, FieldName, function(result){
    alert("success");
}, function(){
   alert("Error");
});
                        
GetContentItems
Method used to return a List of Content Items from a specified Content View.
Agility.CMS.API.GetContentItems(ContentReferenceName, Options, 
                 function(result){ 
                       alert(result.length); 
                  }, 
                  function(error){
                     alert(error);
 });
                        
GetContentViews
Method used to return a list of all the Content Views with a specific Content Definition.
Agility.CMS.API.GetContentViews(123, true, 
                 function(result){ 
                       alert("success");
                       alert(result.length); 
                  }, 
                  function(error){
                     alert("error");
                     alert(error);
});
                        
GetCurrentLanguageCode
Get the currently active Language Code
var LanguageCode = Agility.CMS.API.GetCurrentLanguageCode();
                        
GetFileStoragePath
Used to get the path to external storage or ~/ecms.ashx path for internal documents
Agility.CMS.API.GetFileStoragePath(
                 function(result){ 
                       
                       alert(result); 
                  }, 
                  function(error){
                     alert("error");
                     alert(error);
                  });
                        
GetLanguages
Used to get the current languages available for the current website
Agility.CMS.API.GetLanguages(
                 function(result){ 
                       
                       alert(result.length); 
                  }, 
                  function(error){
                     alert("error");
                     alert(error);
                  });
                        
GetPageByPageID
Method used to get single a Page object by a specific PageID
Agility.CMS.API.GetPageByPageID(pageID, languageCode, 
                 function(result){ 
                       alert("success");
                       alert(result.length); 
                  }, 
                  function(error){
                     alert("error");
                     alert(error);
                  });
                        
GetSitemap
Method to return the tree hierarchy of the Agility Sitemap for the current site. Will allow the user to start from a specific node.
Agility.CMS.API.GetSitemap(startingNode, languageCode, 
                 function(result){ 
                       alert("success");
                       alert(result.length); 
                  }, 
                  function(error){
                     alert("error");
                     alert(error);
                  });
                        
GetStagingDomain
Method use to get the current websites Staging Domain
Agility.CMS.API.GetStagingDomain(
                 function(result){ 
                       
                       alert(result); 
                  }, 
                  function(error){
                     alert("error");
                     alert(error);
                  });
                        

LOGIN

Log in with your Agility username and password or
register for the site




Log In

REGISTER












Register

FORGOT PASSWORD