Configuring a custom Footprint dropdown or select box field
Users can pick an option from a Footprint dropdown field.
Procedure
- Access your Content Manager server and navigate to the
%TRIDION_HOME%(defaults to C:\Program Files (x86)\Tridion\). - Navigate to the subfolder web\WebUI\Models\SiteEdit\Configuration\.
- As a precaution, back up the file SiteEditModel.config.
- Open the file SiteEditModel.config in a plain-text or XML editor.
- Find the
customconfigurationsection. This section has a subsection calledclientconfiguration, which in turn contains afootprintssubsection.You see the list offootprintelements that represent the Footprints which are currently displayed in the Footprint Set dialogs. - Insert a new
footprintelement 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
- Insert a
<title>section inside your newfootprintelement. - For each language that your installation of SDL Tridion supports, insert a
valueelement inside thetitleelement, and give it alangattribute set to the four-digit Microsoft locale ID belonging to that language:1031for German1033for US English1036for French1041for Japanese1043for Dutch3082for Spanish
- Set the contents of each
valueelement to the localized name of this Footprint, as you want it to appear in the Footprint Settings dialog. - Also insert a
valueelement without alangattribute. This is used as a fallback if the language is none of the above. (If you do not insert such avalueelement, the value of theIDattribute of the parentfootprintelement is displayed.)You have now configured a title for your Footprint. - 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 newfootprintelement, directly under the<title>section. - For each language that your installation of SDL Tridion supports, insert a
valueelement inside thedescriptionelement, and give it alangattribute set to the four-digit Microsoft locale ID belonging to that language. - Set the contents of each
valueelement to the localized description of this Footprint, as you want it to appear in the Footprint Settings dialog. - Also insert a
valueelement without alangattribute. This is used as a fallback if the language is none of the above. (If you do not insert such avalueelement, an empty string is displayed.)You have now configured a description for your Footprint. - Insert a
<settings>section inside your newfootprintelement, and inside it, insert an<isMandatory>element containing the valuetrue. - By default, the Footprint control displays as a dropdown control that the user opens to see all options. You may wish to display the control as a select box with a specific height (measured in list items), which shows a scrollbar if it contains more items than the height indicated. To display the control as a select box, insert a
<height>element under the<isMandatory>element and set it to the desired number of items to display in the list box at any one time. - Specify a default value for this Footprint.
To specify a default value, insert a
<values>section inside thefootprintelement. Inside<values>, create avalueelement 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.
- For each language that your installation of SDL Tridion supports, insert a
labelelement inside thevalueelement, and give it alangattribute set to the four-digit Microsoft locale ID belonging to that language. - Set the contents of the
labelelement to the localized text that you want to use to represent the value. For example, if the value refers to the African continent, and thelabelhas alangattribute set to "1036" (France), then the contents oflabelwould beAfrique. - Also insert a
labelelement without alangattribute. This is used as a fallback if the language is none of the above. (If you do not insert such alabelelement, the value of thetextattribute of the parentvalueelement is displayed.)You have now configured a default value for your control. - Add a
valueelement for each of the allowed values, specifying atextattribute and a set oflabelsubelements, as you did for the default value. (For these new elements, omit thedefaultattribute.) - If you want, repeat steps 5-19 to configure further custom Footprint fields that use a dropdown control.
- Save and close SiteEditModel.config.
- Navigate to the subfolder web\WebUI\Editors\SiteEdit\Configuration\.
- As a precaution, back up the file SiteEditEditor.config.
- Open SiteEditEditor.config.
- Find the
customconfigurationsection. This section has a subsection calledclientconfiguration, which in turn contains afootprintssubsection.You see the list offootprintelements that represent the Footprints which are currently displayed in the Footprint Set dialogs. - 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 subfolder web\WebUI\Editors\SiteEdit\Themes\Carbon\Images\Icons\ of the Content Manager root location (defaults to c:\Program Files(x86)\Tridion).
- Add a new
footprintelement with the following attributes:ID- The identifier of the Footprint, as set in SiteEditModel.config.
ControlID-
Set this to
FootprintDropdown Icons- The name you provided for the icon (<iconname>).
- Repeat this step for each new Footprint you configured in SiteEditModel.config.
- Save and close SiteEditEditor.config.
- In the cd_ambient_conf.xml Ambient Data Framework configuration file, add a new
Claimelement in theGloballyAcceptedClaimssection and set itsUriattribute to the Claim URI of your new Claim.
- Organizing options in groups in a dropdown or select box
If your dropdown or select box contains many items, you may want to group them under named headers. For example, if your select box shows countries, you may wish to group them by continent.