Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Find a dcr and tpl files
carletto
Hello!
May it possible find the dcr and tpl files that generated a specific file using a script perl in tpl file?
Find more posts tagged with
Comments
MartinAtCitat
Not exactly sure on what you mean, but yes, as long as you know the file to examine, you can use the CLT "iwextattr" to fetch the template name and the DCR name.
The attributes to look for is:
TeamSite/Templating/PrimaryDCR
TeamSite/Templating/PrimaryDocumentType
TeamSite/Templating/PrimaryPT
(These are the ones that are shown if you do File->File Properties on a generated file from the Webdesk)
Regards
Martin
Citat Solutions AB
Stockholm, Sweden
akshathp
I have a question for your question:
1. Why would you need the information of dcr and tpl in a a*TPL* file? What is your goal?
However, you can definitely use the suggestion by Martin of using "iwextattr" CLT to fetch this information. But why would you need this cyclic routine in your TPL.
If you could state that in more detail, probably we will be able to provide you with a required solution in this regard.
Thanks!
Akshat Pramod Sharma
Interwoven Inc.
carletto
Page A and Page B
The contributor click on browse button and select Page A.
The contributor click on generate button and generate Page B.
In TPL file that will generate PageB, there's a script that extract a specific node from the dcr that it generated Page A.
Now I extract a xml node using XMLParse function passing the follow parameter Dcr Path an NodeName.
My goal is: extract a DCR Path and DCR Name that generated a specific file
Migrateduser
Let me see if I understand correctly: you need a way to determine which pages have been generated by a DCR? In other words, you want to start with the DCR, and find any pages it generated?
If this is true, then what I'd suggest is that you add some code to your TPLs that append a line into a file in the data-type's root directory, recording the date, time, and generated file name each time a file is generated.
Then you can write your required script, which at some point can parse the log file mentioned above and find all the files generated by a particular DCR.
bw
Bob Walden [bob.walden@interwoven.com]
Interwoven Education Group
IM: Yahoo, MSN bob_walden