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)
Change DCR from presentation template
Winston
I there a way to change/add a value in the DCR from the presentation template?
Thanks.
Find more posts tagged with
Comments
Migrateduser
Not sure on what you're trying to do --
please elaborate.
Dave
hitc
a dave said,you should explain a little more on what you want to accomplish.But basically you can do nearly everything you want using perl and XML.But wich dcr do you want to change?
the one you are previewing?another one in another branch?
Winston
I'm trying to add the production URL for a HTML page to the DCR. I'm able to get the Production URL into the presentation template and output it the HTML. But I'd like to store it the DCR for use when I archive the HTML and DCR.
Thanks.
Migrateduser
Okay, totally doable. But what's more straight-forward than parsing and then rewriting the DCR and perhaps just as useful is storing the production URL as an extended attribute.
Does that agree with your requirements?
If not, you can certainly modify the DCR through, say, the presentation template.
Dave
Winston
That's a great idea but I need it to show up in the data capture when it's edited in the archive branch. I'll hide it when it's in production.
Thanks.
Migrateduser
Okay, then EA's are not the answer. So, how about opening, parsing, and modifying the DCR's XML when the Presentation Template runs?
Dave
Winston
That's what I want to do, but not sure how to do it?
Thank.
Dwayne
See '
perldoc TeamSite::XMLparser
' and '
perldoc TeamSite::XMLnode
' for information on dealing with DCRs directly within Perl.
--
Current project: TS 5.5.2/6.1 W2K
Migrateduser
TeamSite::XMLParser is a pretty good module for this. Try doing a "perldoc TeamSite::XMLParser" to see usage notes and look through DevNet to see examples -- there are PLENTY of working examples on DevNet for this.
Dave
iwovGraduate
That's what I want to do, but not sure how to do it?
You can use <iw_perl> tag withing your PT and write some Perl code to do it.
If you are not familiar with Perl/PT tags, etc., read the manuals. Go through the examples. Search the KBs. Search the forums. There are plenty of examples out there.