Configuring a custom Footprint text field

Users can enter any string they want in a Footprint text field, but you can use regular expressions or a fixed set of values to restrict which values are valid, and you can set a minimum and/or maximum length.

Procedure

  1. Access your Content Manager server and navigate to %TRIDION_HOME%.
  2. Navigate to the subfolder web\WebUI\Models\SiteEdit\Configuration\.
  3. As a precaution, back up the file SiteEditModel.config.
  4. Open the file SiteEditModel.config in a plain-text or XML editor.
  5. Find the customconfiguration section. This section has a subsection called clientconfiguration, which in turn contains a footprints subsection.
    You see the list of footprint elements that represent the Footprints which are currently displayed in the Footprint Set dialogs.
  6. Insert a new footprint element for the custom Footprint field you want to configure, and give it the following attributes:
    ID
    a unique string that identifies this Footprint
    ClaimUri

    the URI of a Claim associated with this Footprint, for example:

    taf:claim:foo
  7. Insert a <title> section inside your new footprint element.
  8. For each language that your installation of SDL Web supports, insert a value element inside the title element, and give it a lang attribute set to the four-digit Microsoft locale ID belonging to that language:
    • 1031 for German
    • 1033 for US English
    • 1036 for French
    • 1041 for Japanese
    • 1043 for Dutch
    • 3082 for Spanish
  9. Set the contents of each value element to the localized name of this Footprint, as you want it to appear in the Footprint Settings dialog.
  10. Also insert a value element without a lang attribute. This is used as a fallback if the language is none of the above. (If you do not insert such a value element, the value of the ID attribute of the parent footprint element is displayed.)
    You have now configured a title for your Footprint.
  11. If you want, you can also write a description for your Footprint. The description appears under the title in the content area on the right if the user selects this Footprint. To create a Footprint description, insert a <description> section inside your new footprint element, directly under the <title> section.
  12. For each language that your installation of SDL Web supports, insert a value element inside the description element, and give it a lang attribute set to the four-digit Microsoft locale ID belonging to that language.
  13. Set the contents of each value element to the localized description of this Footprint, as you want it to appear in the Footprint Settings dialog.
  14. Also insert a value element without a lang attribute. This is used as a fallback if the language is none of the above. (If you do not insert such a value element, an empty string is displayed.)
    You have now configured a description for your Footprint.
  15. If you want to disallow empty values for this field, insert a <settings> section inside your new footprint element, and inside it, insert an <isMandatory> element containing the value true.
  16. If you want, you can specify a default value for the Footprint.

    To specify a default value, insert a <values> section inside the footprint element. Inside <values>, create a value element with the following attributes:

    text
    The value of the field, as it will be submitted. Set this attribute to the empty string (text="") to make the empty value default.
    default
    Set this attribute to true.
  17. For each language that your installation of SDL Web supports, insert a label element inside the value element, and give it a lang attribute set to the four-digit Microsoft locale ID belonging to that language.
  18. Set the contents of the label element to the localized text that you want to use to represent the value. For example, if the value refers to the African continent, and the label has a lang attribute set to "1036" (France), then the contents of label would be Afrique.
  19. Also insert a label element without a lang attribute. This is used as a fallback if the language is none of the above. (If you do not insert such a label element, the value of the text attribute of the parent value element is displayed.)
    You have now configured a default value for your control.
  20. Next, you can restrict the allowed values of this text field in one of the following ways:
    • You can specify a regular expression for the text in the form of a regExp element inside the <settings> section (create this section if you have not done so yet). Set the value of regExp to the regular expression that the input value should match. For example, to match only uppercase and lowercase letters, set regExp to ^[A-Za-z]+$.
    • You can add a value element for each of the allowed values, specifying a text attribute and a set of label subelements, as you did for the default value. (For these new elements, omit the default attribute.) This is only recommended if your set of allowed values is large; for smaller sets, use FootprintRadio or FootprintDropdown instead.
  21. If you want, repeat steps 5-19 to configure further custom Footprint fields that use a text field.
  22. Save and close SiteEditModel.config.
  23. Navigate to the subfolder web\WebUI\Editors\SiteEdit\Configuration\.
  24. As a precaution, back up the file SiteEditEditor.config.
  25. Open SiteEditEditor.config.
  26. Find the customconfiguration section. This section has a subsection called clientconfiguration, which in turn contains a footprints subsection.
    You see the list of footprint elements that represent the Footprints which are currently displayed in the Footprint Set dialogs.
  27. Create an icon for the custom Footprint in the form of a set of PNG files named footprint.<iconname>.16x16.png (16 by 16 pixels), footprint.<iconname>.24x24.png (24 by 24 pixels), footprint.<iconname>.32x32.png (32 by 32 pixels) and footprint.<iconname>.48x48.png (48 by 48 pixes), where <iconname> is a name for your icon. Save these files in the folder %TRIDION_HOME%\web\WebUI\Editors\SiteEdit\Themes\Carbon\Images\Icons\.
  28. Add a new footprint element with the following attributes:
    ID
    The identifier of the Footprint, as set in SiteEditModel.config.
    ControlID
    Set this to FootprintText.
    Icons
    The name you provided for the icon (<iconname>).
  29. Repeat this step for each new Footprint you configured in SiteEditModel.config.
  30. Save and close SiteEditEditor.config.
  31. In the cd_ambient_conf.xml Ambient Data Framework configuration file, add a new Claim element in the GloballyAcceptedClaims section and set its Uri attribute to the Claim URI of your new Claim.