Load rule: exclude sub folders
Hello everyone,
we are currently trying to exclude a sub folder in a component from being loaded. In the load rule, we are using the parentLoadRule with exclude and filter elements below. This works fine when excluding elements in the root folder of the component, but we cannot exclude only specific sub folders.
For example, we have the following structure in the component:
- Test
- Test\A
- Test\B
We would like to only exclude "Test\B".
Is this possible at all? The documentation seems to hint into this direction: "[...] filtering to control which of the immediately contained items should be loaded [...]"
I appreciate any input or advice on this topic!
we are currently trying to exclude a sub folder in a component from being loaded. In the load rule, we are using the parentLoadRule with exclude and filter elements below. This works fine when excluding elements in the root folder of the component, but we cannot exclude only specific sub folders.
For example, we have the following structure in the component:
- Test
- Test\A
- Test\B
We would like to only exclude "Test\B".
Is this possible at all? The documentation seems to hint into this direction: "[...] filtering to control which of the immediately contained items should be loaded [...]"
I appreciate any input or advice on this topic!
2 answers
Hi Alex,
you can use "Parent Load Rule" and "Exclude filter"
..."
..."
you can use "Parent Load Rule" and "Exclude filter"
..."
exclude
The exclude element is a collection of filter elements to be applied to the names of the items contained within the parent folder to decide whether they should be in the list of items to be loaded or not. Note the include filters are also applied (if specified) so if the include filters does not identify an item to be considered for loading, then it will also be excluded even though not specifically listed in the exclude filters. The filter allows for an exact name match or a pattern match on the name...."
Hello Alexander,
you can achieve this like the following:
(optional)
<parentLoadRule>
<component name="Component/>
<parentFolder repositoryPath="/"/>
<exclude>
<filter pattern="Test"/>
</exclude>
<sandboxRelativePath pathPrefix="/Component/"/>
</parentLoadRule>
(mandatory)
<parentLoadRule>
<component name="Component/>
<parentFolder repositoryPath="/Test/"/>
<exclude>
<filter pattern="B"/>
</exclude>
<sandboxRelativePath pathPrefix="/Component/Test/"/>
</parentLoadRule>