Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
metadata_rules.cfg
motlnt
Hi All,
I have a DCR and want to have two different metatagger UI's for it.
All the folders other than 3rd_party_tools should access MT UI with rule name "tools" while the DCR's in 3rd_party_tools folder should access MT UI with rule name "third_party_tools".
Here is the configuration done in metadata_rules.cfg
<cond vpath-regex="default/main/sps/tools/WORKAREA/workarea/templatedata/summary_tools/tool/data">
<rule name="tools" />
<cond vpath-regex="/3rd_party_tools">
<rule name="third_party_tools" />
</cond>
</cond>
The issue is that it always opens up the general rule name "tools" for all the folders, hence it opens "tools" rule name MT UI for 3rd_party_tools folder too..
Is there any other way of configuring this functionality?
Find more posts tagged with
Comments
Adam Stoller
You nested the conditions - which means that the inner condition is included within the outer condition.
Perhaps you want to do:
<cond vpath-regex="/3rd_party_tools">
<rule name="third_party_tools" />
</cond>
<cond vpath-regex="default/main/sps/tools/WORKAREA/workarea/templatedata/summary_tools/tool/data">
<rule name="tools" />
</cond>
or
<cond vpath-regex="/3rd_party_tools">
<rule name="third_party_tools" />
</cond>
<cond vpath-regex="default/main/sps/tools/WORKAREA/workarea/templatedata/summary_tools/tool/data/[^3][^r][^d][^_].....">
<rule name="tools" />
</cond>
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
motlnt
Thanx for the response!!
If we consider,
cond vpath-regex="/3rd_party_tools">
<rule name="third_party_tools" />
</cond>
<cond vpath-regex="default/main/sps/tools/WORKAREA/workarea/templatedata/summary_tools/tool/data">
<rule name="tools" />
</cond>
It will call for third_party_tools rule names for the "3rd_party_tools" folder in any branch path.
But i want to call rule name "third party tools" when the regex is default/main/sps/tools/WORKAREA/workarea/templatedata/summary_tools/tool/data/3rd_party_tools.
and rule name "tools" for all the folders other than 3rd_party_tools in default/main/sps/tools/WORKAREA/workarea/templatedata/summary_tools/tool/data.
That was the reason i had put the inner query for third_party_tools.
Even the documentation says it will work with inner query but it is not working for me.
Can you tell me the issue with this.
Adam Stoller
You could try:
<cond vpath-regex="default/main/sps/tools/WORKAREA/workarea/templatedata/summary_tools/tool/dat/3rd_party_tools">
<rule name="third_party_tools" />
</cond>
<cond vpath-regex="default/main/sps/tools/WORKAREA/workarea/templatedata/summary_tools/tool/data">
<rule name="tools" />
</cond>
But I think you'll still run into the case where *both* 'tools' and 'third_part_tools' rules will be applied - what you're looking for is something like an if-then-else logic structure, which the metadata-rules.cfg does not seem to support. While I'd be happy to be wrong in this case, I think your best bet is to file a feature request with support -- it won't help right now, but it may help down the road.
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
james1
Have you tried a regex like this:
<cond vpath-regex="/3rd_party_tools">
<rule name="third_party_tools" />
</cond>
<cond vpath-regex="default/main/sps/tools/WORKAREA/workarea/templatedata/summary_tools/tool/data/[0-24-9a-zA-Z]">
<rule name="tools" />
</cond>
This is assuming that "3rd_party_tools" is the only sub-folder that begins with a "3".
I don't remember what flavor of regex is used in metadata_rules.cfg -- you might have to use a different regex syntax.
Hope this helps.
-- James
--
James H Koh
Interwoven Engineering