• How to obtain geographical information based on IP address using API

    DescriptionThis is a code sample on how to obtain the geographical information based on user IP address for testing purposes: Note: This will not work for private IP addresses ONLY public IP addresses. ResolutionCode Sample Please note that this sample can be used in conjunction with the following API call to test various IP addresses. This is useful for testing if your IP address is located in the GEOIP database or not.Ektron.Cms.UserContext.OverrideIP("external.ip.here.");

  • How to preview content in 3 tier environment.

    DescriptionThis is an example of how to preview content that has not been published in a 3-tier environment.  ResolutionIn this use case you will need to request an authentication token for a admin level user in order to view content that has not been published.                   string UserName = "UserName";         string Password = "Password";         var _userManager = new Ektron.Cms.Framework.User.UserManager();         string authToken = _userManager.Authenticate(UserName, Pas...

  • How to securely verify if user is logged in using API

    DescriptionSample of different variations that can be used to validate if a user is logged in or not using the API. ResolutionFor 9.0 and versions prior use: ContentApi.EkContentRef.IsAllowed(0, 0, "users", "IsLoggedIn", ContentApi.UserId); For 9.1 use: Ektron.Cms.ObjectFactory.GetUser().IsCmsLoggedIn

  • How to set the secure flag for the ECM cookie.

    DescriptionThis is an example on how to set the secure flag for the ECM cookie.  ResolutionTo properly secure the ECM cookie: Run your site in HTTPS Create a Global.asax file in your site root.Place the following snippet of code in the  Application_EndRequest of the Global.asax file.    void Application_EndRequest(object sender, EventArgs e)     {         for (int iloop = HttpContext.Current.Response.Cookies.Count - 1; iloop >= 0; iloop -= 1)         {             HttpCookie...

  • How to test out a form issue using a stock formblock control

    DescriptionThis KB describes how to test the behavior of an Ektron form to determine if it is working properly.The sample template strips away all custom JavaScript, master pages, CSS, and so on, to give a "clean" test of the functionality. This helps to determine if the issue is in the context of the form itself or if there is an issue with the template code around the form. If the template works, examine the possible conflicts posted in this article. ResolutionBelow are 2 form control...

  • How To Use The Forum API Methods

    DescriptionThis article goes over how to use the various forum api methods to pull data out of the cms instead of using the forum server control ResolutionCreate a board/forum/topic bool auth = true; //require authorization string[] categories = { "test", "test1" }; long parentfolderid = 0; Ektron.Cms.API.Content.ThreadedDiscussion td = new Ektron.Cms.API.Content.ThreadedDiscussion(); long boardid = td.AddBoard(parentfolderid, "Name of the Fo...

  • Message Board Server Control

    DescriptionBasic example of a messageboard control for testing. To access messageboard for a content item enter an id in the querystring. For pagebuilder it works off of pageid (ex http://site.com/messageboard.aspx?id=30) ResolutionCode Download

  • Move Content Sample

    DescriptionThis sample shows how to move content from one folder to another. In the code you specify the source and destination folders ResolutionCode Download

  • Multiple DMS and Library File Uploader

    DescriptionThis sample workarea smart desktop widget allows uploading to any folder within the cms that you have add permissions to. It works with any HTML 5 browser and allows you to drag and drop files in for uploading. Because it doesn't use the same mechanisms that the workarea normally uses, it allows for multiple dms uploads in all browsers. It also allows for multiple uploads to the library with currently does not exist in the workarea.  There are a few limitations when using this tha...

  • Pagebuilder Test Template

    DescriptionSample of a pagebuilder template that allows for multiple dropzones. Does not contain a master page for testing purposes. ResolutionCode DownloadAdd the code into your site rootLogin to the workarea and navigate to settings > configuration > template configurationAdd a new template and browse to this template. Select that it is a pagebuilder page and add widgets to it. Save the templateThe template should now be ready to use as a test to see if the toolbar is working or to se...

  • Photo Gallery Server Control

    DescriptionPhoto Gallery server control sample code to test basic functionality of the controlResolutionCode Download

  • Publish and Edit Content Email Notification Strategy

    DescriptionThe is a code sample on how to create a content strategy that sends an email notification when either a content item has been published or has had changes made to it for testing purposes. *Note - This strategy was tested in 9.1 SP1.  ResolutionCode Sample This sample has two files.    PublishSendAlert.cs  This is the class file implementation for the Content Strategy  objectFactory.config  This is the configuration file that has an entry that points to the impleme...

  • Purge Content History

    DescriptionThis code purges content history from the database outside of the workarea. The code finds folders individually to prevent timeouts.Please create a backup of the database before running this page. ResolutionCode Download

  • Purge Form Submissions

    DescriptionBelow is a link to sample code on how to purge form submissions. It pulls in a list of forms and you can specify a date to start the purge from. The code will loop through the results and purge the entries.  ResolutionCode Download

  • Regenerate broken or outdated pagebuilder thumbnails

    DescriptionSometimes pagebuilder thumbnails will show up as broken or outdated in the CMS either because at the time the template was added, the pagebuilder wireframe had an error on it or the wireframe has changed and isn't accurately reflected by its thumbnail anymore. The template below allows you to update the thumbnail for an individual or for all pagebuilder templates.  When updateding a template directly in the workarea, the thumbnail is not regenerated. ResolutionCode Download ...

  • RSS Feed

    DescriptionThis is a sample RSS feed template that is being used on the portal for the latest KB articles. It allows for using taxonomy and content folders and also support recursive functionality and custom filtering with metadata. ResolutionCode Download

  • Sample Ektron To Episerver Migration Code

    DescriptionThis article contains a link to a sample project that can be leveraged for migrating content from Ektron to Episerver.ResolutionFor  additional information and consideration moving from Ektron to Episerver (DxC) please click here. For  the sample project which includes code to migrate content please click here.

  • Sample Export Report for Ektron Content

    Description This article demonstrates the use of legacy Ektron Commerce API to pull information for a local report.  This was tested in 8.02 SP5 but concepts and some of the non-Ektron code segments can also be applied to later version implementations. The code sample below illustrates the following concept:1. How to use the Commerce API in your version to retrieve catalog entry information.2. How to output the data to a control.3. Sample code on generating a file with information. (Not...

  • Sample Menu using Framework MenuManager API

    DescriptionThis is a sample on how to create a menu using the Framework MenuManager API for testing purposes. *Note: This was testing on 9.1 SP1 ResolutionCode Sample

  • Sample on how to add a new Page Layout using the Pagebuilder APIs

    DescriptionThis is a sample on how to add a new Pagebulder Page Layout using the Ektron Pagebuilder APIs.* Note - This sample was created and tested in 9.1 Sp2 ResolutionCode Download  Related LinksAdditional ResourcesPagebuilder Test Template

  • Sample on how to display content dynamically using the ContentView templated server control

    DescriptionThis is a code sample on how to display content dynamically using the ContentView templated server control for testing purposes. This was tested on a 9.1 SP1 min site.  Cause ResolutionCode Sample

  • Sample on how to find and replace HTML content text

    DescriptionSample on how to find and replace HTML content text using ContentManager.  ResolutionCode Sample

  • Sample Site Slider (rotating banner) widget

    DescriptionThis is a sample site image slider for testing purposes. This sample custom widget was tested in version 9.1 SP1 and 9.0 SP2. * Note: This is a custom widget and may not work for some use cases. ResolutionCode Sample   File Contains: Site-Slider ascx , .cs, and .jpg control files Supporting files ( JS, css, images) XML for Smart Form the widget pulls the data from SiteSlider.cs App Code file   How to use: In the site root: Place the siteslider.cs file in the App Code folder of ...

  • Sample workarea widget for archiving all Content in a specified folder

    DescriptionSample workarea widget where you can chose a specific folder and archive the entire contents of that folder for testing purposes. * Note: This is a Workarea widget (not Pagebuilder) widget.Please refer to the following documentation on how to add the widget to the smart desktop.http://documentation.ektron.com/cms400/v9.10/Reference/Web/EktronReferenceWeb.html#Content/Managing_Content.htm#workarea_understand_smart_desktop_2387673936_1010546 ResolutionWidget Code Sample

  • Searching for term in code behind using Site Search Control.

    DescriptionThis is an example of how to search for a term in the code behind using a site search controller for testing purposes.  ResolutionSearch term code Sample

  • Searching smart form fields using the framework API

    DescriptionThis is a sample on how to search the fields of a smart form using the Search Manager API for testing purposes. This was tested on 9.1 SP1 using SOLR Search.   *Note: In order to search the fields of a smart form the fields have to be indexed   ResolutionCode Sample       Where to find you XPath information under Settings > Configuration > Smart Form Configuration:     *Note: If you want to search for numeric fields use: SearchSmartFormProperty.GetIntegerProperty If you want to r...

  • Selecting site language using the Framework API

    DescriptionThere are two out of the box Ektron server controls for selecting and using Site Langauge: the LanguageSelect and LanguageAPI server controls. They can be found here.  The issue is that these controls are not 3-tier compatible. If you want to develop a language selection control, it will have to be with our framework APIs.  ResolutionPlease use the framework APIs to create you own user control for template use. The sample of the API is located in our templates section here.

  • Services Console Application Using Framework API

    DescriptionThis is a sample application that demonstrates the use of Ektron services and Framework API to add new content to a CMS system.ResolutionCode Download To use this sample: 1. Download the sample and open it in Visual Studios (tested with 2012). 2. In the App.Config file, set the ek_ServicesPath value to the site URL service path.         Example :  <add key="ek_ServicesPath" value="http://cms400min91sp1/workarea/services/"/> 3. In the example under Program.cs, update the accou...

  • Show Hidden Desktop View On Pagebuilder Templates

    DescriptionA situation may arise where you will need to setup a dropzone in pagebuilder to be hidden for desktop view. Because of this, the dropzone will be hidden from view even in edit mode. There are a couple of ways around this issue listed below. ResolutionResize the browser window. Because the view is hidden, if you haven't specified the invisible option for smaller dropzones, you can shrink the browser window down to allow you to see the column and change the property.Add the cod...

  • Sitemap Generator

    DescriptionThis sample shows how a sitemap.xml file can be generated by using the content manager with either taxonomy or folder ids.ResolutionCode Download Note: This sample was written using newer API's that may not work for older versions of the product.