Task Description
...
- If this is the first dynamic term list you are adding to
domain-instance-vocabularies.xml
, then add<instances>
and</instances>
to the top and bottom of the file. The markup to create a dynamic term list requires a
instance
element:
Code Block | ||
---|---|---|
| ||
<instance id="vocab-{brief vocabulary name}">
<web-url>{brief vocabulary name}</web-url>
<title-ref>{brief vocabulary name}</title-ref>
<title>{display name of vocabulary}</title>
<options>
<option id="{brief term identifier}">{term meaning}</option>
<option id="{brief term identifier}">{term meaning}</option>
<option id="{brief term identifier}">{term meaning}</option>
....
</options>
</instance>
| ||
The 'brief vocabulary name' is the identifier used when you use the field in the Many dynamic term lists can be created in the domain-instance-vocabularies.xml
file, each in their own <instance> ... </instance>
block.
Example of a complete domain-instance-vocabularies.xml
file
Code Block | ||||
---|---|---|---|---|
| <!-- The wrapper tag -->
<instances>
<!-- Each dynamic term list is contained in an 'instance' block -->
<instance id="vocab-approvalState">
<web-url>approvalState</web-url>
<title-ref>approvalState</title-ref>
<title>Approval States</title>
<options>
<option id="yes">Yes</option>
<option id="no">No</option>
<option id="pending">Pending</option>
<option id="notrequired">Not Required</option>
</options>
</instance>
<!-- Another dynamic term list can follow -->
<instance id="vocab-exitMethod">
<web-url>exitMethod</web-url>
<title-ref>exitMethod</title-ref>
<title>Exit Method</title>
<options>
<option id="courier">Courier</option>
<option id="inperson">In Person</option>
<option id="post">Post</option>
</options>
</instance>
</instances> ||||
The domain-instance-vocabularies.xml
file is automatically processed when the application layer and service layers are built. The file in your tenant directory will override the file with the same name in the defaults
directory (which is typically a file no dynamic term list definitions.
...