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)
Negate path with vpath-regex
Jeremy
TS 6.1 Solaris
Hi,
I'm looking for a RTFM or a push in the right direction or anything that can tell me whether it is possible.
In templating.cfg I would like to be able to negate the match in the "locations" tag for each category. Instead of inserting what branches it should appear in, I would rather I listed the branches it shouldn't appear in.
I have tried the following :
<category name="intra_config">
<locations>
<branch vpath-regex="^[^m][^v]*"/>
</locations>
.....
This works as normal regex but not within the templating.cfg file. It should not match anything starting with "mv" but this does not work.
Does anyone know if this is possible or where I am going wrong.
Thanks,
Jeremy
Find more posts tagged with
Comments
Adam Stoller
I'm not sure if it matters, but shouldn't you have a '.' in there?
<branch vpath-regex="^[^m][^v]
.
*"/>
Are you trying to restrict templates that actually exist in that vpath, or eliminate templates from showing up where they don't really exist?
If the latter, I suggest using the
prune-missing-files="t"
directive as documented in the templating.dtd / Forms Publisher Developer's Guide
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
Jeremy
Hi Ghoti,
Thanks for the response. You were right about the "." - it doesn't make a difference but we had missed it out.
We are trying to eliminate templates from showing up where they don't exist. I searched the dtd - "templating6.0.dtd" - for "prune-missing-files" but it is not in there.
I also searched the Forms Publisher Guide but I can't seem to find it (tst.600.dev.pdf).
I searched around the DevNet and found where I should be inserting it.
Unfortunately I also found that we'd need to have 6.1 SP2 + Patch. We don't have the patch that fixes this bug. See
this
thread.
Thanks for the help we now just have to apply the patch!
Jeremy
Adam Stoller
From that thread, it looks like 6.1SP1 or 6.1SP2+patch will work, but from your post it sounds like you're on 6.0 - yes? (didn't anyone tell you never to take a .0 release ? :-)
Also, I can tell you that it works in 6.5SP1 (possibly 6.5.0 too)
Well - you can struggle with the regex's or try to convince your powers-that-be to upgrade ... Sorry.
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
Jeremy
We upgraded our Dev box to SP2+Patch and the prune-missing-file="t" functionality now works.
Just have to get that propogated up through the servers.
Thanks for the help Ghoti.
jwl
TS6.5 Sol9
Hi,
Struggling with regex...
In templating.cfg, I have:
<branch vpath-regex="(LGAQ|lgaqDev)"/>
I want the templates to be available for all sub-branches under LGAQ/ and /lgaqDev *except* LGAQ/councilx and lgaqDev/councilx
Would dearly appreciate guidance on how to achieve this.
Thanks in advance.
John
Adam Stoller
I've said it before, I'll say it again - you'll probably be better off using the prune-missing-files directive at the top of templating.cfg so that TS will only notices the templates that are actually available in a given branch, rather than trying to use branch regex's -- especialy in your situation where you want to exclude some that would otherwise be included in the regex.
The performance hit (as IWOV indicated) seems to be marginal at best - but it's a **** of a lot easier to configure and maintain.
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
jwl
Thanks ghoti, this worked beautifully.