Show only a subtree of the taxonomy structure (using conditional relations)
We will configure the SDL Tridion Docs SES Connector in such a way the user will only be able to browse a specific subtree of terms. The tree shown is filtered even more by using conditions on the relations.
About this task
In Hypothetical taxonomy tree structure we defined a certain taxonomy structure. Instead of showing the entire taxonomy structure, we will configure the field FLOCATION in such a way that it will only show 2 fixed subtrees, namely the subtree below continents Australia and Europe. These terms will be the root terms or entry points in the tree. However, we will limit the tree even more, so that it will not show the cities anymore. We will allow all terms to be selectable.
Australia {id=5, class=continent, selectable=yes}
- Australia {id=38, class=country, selectable=yes}
Europe {id=17, class=continent, selectable=yes}
- France {id=105, class=country, selectable=yes}
Procedure
Results
<infoShareExtensionConfig version="1.0">
<metadatabindings>
<metadatabinding ishfieldname="FLOCATION" sourceref="SESExampleModelDataSource" />
</metadatabindings>
<sources>
<source id="SESExampleModelDataSource" handler="SmartLogicSESConnector">
<initialize>
<parameters>
<parameter name="ses.api.url">http://smartlogic.example.com/ses</parameter>
<parameter name="ses.api.tbdb">Example</parameter>
<parameter name="metadatabinding">
<fields>
<field name="FLOCATION" level="logical">
<read>
<entrynodes>
<static>
<id>5</id> <!-- id of continent Australia -->
<id>17</id> <!-- id of continent Europe -->
</static>
</entrynodes>
<selectable/>
<relations>
<relation ref="narrowerterm" />
</relations>
</read>
</field>
</fields>
</parameter>
<parameter name="relations">
<relations>
<relation type="hierarchical" id="narrowerterm" abbreviation="NT" direction="Forward">
<from>
<condition name='CLASS'>continent</condition>
</from>
<to>
<condition name='CLASS'>country</condition>
</to>
</relation>
</relations>
</parameter>
</parameters>
</initialize>
</source>
</sources>
</infoShareExtensionConfig>