Knowledge Base — Ektron Development

  • Generate Class for Smart Form

    Create C# or VB.NET class to programmatically access Smart Form data. Smart Form data is XML and may be processed using XSLT, an XML parser (XmlDocument), Linq/XQuery or even as a string. It may also be deserialized into a .NET object given a C# or VB.NET class. This article describes how to generate a class from a Smart Form design.

  • Restrict access to a file or folder

    How to restrict access to a file or a folder based on incoming IP addresses 

    Securing a Folder 

    1. Open IIS Manager (Start > Run > Open INETMGR and hit enter)
    2. Navigate to web site
    3. Select the folder, which needs restriction
    4. In features view double click on “IPv4 Address and Domain Restrictions
    5. In Action pane click “Add Allow Entry”
    6. Select “Specific IPv4 Address” radio button
    7. Enter IP address and click OK.
    8. In action pane click “Edit Feature Settings”
    9. Select “Deny” from the drop down and click OK

      IIS Mgr

     Securing a File 

    1. Open IIS Manager (Start > Run > Open INETMGR and hit enter)
    2. Navigate to web site
    3. Switch to “Content View”
    4. Select and right click on the file which needs restriction
    5. Select “Switch to Features View” from context menu
    6. In features view double click on “IPv4 Address and Domain Restrictions
    7. In Action pane click “Add Allow Entry”
    8. Select “Specific IPv4 Address” radio button
    9. Enter IP address and click OK button.
    10. In action pane click “Edit Feature Settings”
    11. Select “Deny” from the drop down and click OK
      Secure Content
     

  • How to populate a select list in a Smart Form or HTML form from an external data source (eWebEdit400)

    This article describes how to fill a choices list on a Smart Form or HTML form with dynamic content when using eWebEdit400 (a.k.a., ContentDesigner). 

    These are the steps to add a dynamic data list to the Choices field.

    You will need access to the files on the server. This change cannot be done through the Ektron CMS workarea UI.

    1. Edit the datalist specification xml file in an editor (e.g., Visual Studio or notepad)

    ~\workarea\ContentDesigner\DataListSpec.xml

    2. The values of the data list may be defined in the datalist specification or in a separate XML data source.

    Example (new one is shown in bold, underline),

    <datalist name="LISTNAME" localeRef="LISTNAME" src="{url to xml data source}" cache="false" select="{xpath to data item element}" captionxpath="{relative xpath to data item's display text}" valuexpath="{relative xpath to data item's value}">
    <datalist name="USPS-CA" localeRef="sCaPrvnc" src="[srcpath]/uspsca.xsd" select="/xsd:schema/xsd:simpleType/xsd:restriction/xsd:enumeration" captionxpath="xsd:annotation/xsd:documentation" valuexpath="@value" namespaces="xmlns:xsd='http://www.w3.org/2001/XMLSchema'" validation="select-req">
      <item value="" localeRef="sSel" />
    </datalist>
    <datalist name="ageRange" localeRef="sAgeRng" validation="select-req">
      <item value="" localeRef="sSel" />
      <item value="10">0-15</item>
      <item value="20">16-25</item>
      <item value="30">26-35</item>
      <item value="40">36-45</item>
      <item value="50">46-55</item>
      <item value="60">56-65</item>
      <item value="70">66-75</item>
      <item value="80">76-85</item>
      <item value="90">86+</item>
    </datalist>

    3. Edit ~\Worarea\ContentDesigner\Resources\DataListSpec*.resx

    Add the name of your new list ("LISTNAME") to the resource files

        <data name="LISTNAME" xml:space="preserve">
              <value>Name of list</value>
        </data>

    That's all there is to it. This data list will now be available when designing Smart Forms and/or HTML forms.

    Change values in code-behind

    Data list values in HTML Forms may also be changed in code-behind. An example is in http://localhost/CMS400Developer/developer/Forms/FormBlock.aspx.

    Dim objFieldItem As FormFieldItem
    objFieldItem = FormBlock1.Fields.Item("State")
    If (Not IsNothing(objFieldItem)) Then
        objFieldItem.DatalistItems.Clear()
        ' List just the 48 contiguous US states and D.C.
        objFieldItem.DatalistItems.Add(New FormFieldItemDatalistItem("Maine", "ME"))
        objFieldItem.DatalistItems.Add(New FormFieldItemDatalistItem("Alabama", "AL"))
        :

  • Troubleshooting System Notification Emails


    This article goes over some common troubleshooting steps to make sure system emails are working successfully.

     

    Note: This is used for the System Notification functionality NOT the Notification Service

Don’t see what you’re looking for? Check out our forums. We have a large community of passionate, helpful developers.

What Do You Think of our New Design?

    

Have more to say? We’d love to hear it!