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)
generate another DCR
sara
Hi,
I would like to know whether it is possible (and how) to generate a new DCR by generating the result of an existing DCR.
Consider a new release of our site where a DCT changes: two textfields are joined in one field. Suppose textfield named "field-a" and textfield named "field-b" and the new DCT contains the textfield named "joined-field"
If you open the existing DCR with the new DCT, it shows only the "joined-field" and content of the old fields is lost.
What we would like to do is: create a TPL that generates a new DCR, with the joined content of "field-a" and "field-b". (a followed by b for example)
How can we manage our new releases without loss of content? (and without having to open 2 DCR's (the old one and a new one) for copying the content manually)
Thx
Find more posts tagged with
Comments
Adam Stoller
This may be tricky to do within the templating engine itself, at least from the GUI, but it may also be possible. Essentially you need to make sure you do *not* open the DCR within the GUI before you've re-created it. In the early stages of development/testing I would suggest making copies of your existing DCRs so that you don't lose anything.
Essentially, the PT would have to read the values from the DCR like it normally does - but you would then output the data in DCR-XML-format to another file in the same directory, and then run iwextattr to adjust the EAs on the generated file to look, instead, like the EAs on the original DCR - after that you could try renaming the old DCR (foo => foo.old) and renaming the new DCR (foo.new => foo).
Alternatively - and this might be simpler - write a script to do the conversion for you (running along the same concepts as above - just without the templating engine behind it).
On the face of it, it probably shouldn't be too difficult, but I suggest taking some time to truly design the process before trying to code and test it.
--fish
(Interwoven Senior Technical Consultant)
sara
Thanks,
I have tested it with a simple example, and it looks like the iwextattr part works.
At the moment we are designing the release management process, and i wanted to know if my assumption would work out well before going deeper.
S