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)
Call another DCR inside PT and generate 2 files
System
Is it possible to open and process another DCR inside a PT and have it output two files instead of just one for the current DCR? What I would like to do is have a DCT for a sidebar index in a web site that will allow users to adjust the order in which items appear and have the PT for the web page that uses that sidebar to generate the sidebar as a separate file (that will be included into the final web page using SSI). I've already written some Perl to do this manually in an index.txt file but I was thinking that maybe it would be better to keep them all as DCRs.
At the moment I have a component template that reads and writes to the index.txt file whenever a page is previewed to add the new file to the index (if it isn't already there). The main reason for wanting to see if I can do it with pure DCRs/PTs is so that the user could just open the index DCR and adjust the order using TeamSite's built-in ability to move replicants up and down. Otherwise, I'd be writing my own callout to achieve the same result (which I'm going to do if TeamSite can't open DCRs within PTs and apply the necessary PT to the "included" DCR and output two results).
I hope I haven't confused anybody (I had to read this post a few times myself to make sure I got it right :-)
PS. the whole reason for keeping the sidebar separate is so that several pages in one directory can share the index and highlight the current web page as necessary.
Find more posts tagged with
Comments
Dwayne
Take a look at <iw_ostream> and <iw_load_dcr>. A combination of those tags will do exactly what you're asking about
--
Current project: TS 5.5.2/6.1 W2K
Adam Stoller
Note: All iwostream buffers that are written out (other than the 'default' buffer which corresponds to the 'ofile' on the command line) will *not* have TeamSite Templating extended attributes associated with them. If you want those output files to have TST EAs (so that if you try to edit the file you get taken to the DCR rather then editing a static page) - you'll probably need to set them either within the PT or as some follow-on process.
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
Johnny
ostream do make things a little tricky when you are trying to tie up the creation process.
If you are planning make page generation and workflow submission automatic, your workflow task to generate the pages should probably use iwpt_compile.ipl instead of iwgen
using the -manifest flag you can determine what output files were created (ofile and ostream files) and then set the TST EA's on them and also attach them to the workflow.
John Cuiuli
Migrateduser
I should say that I only graduated from Bill Ogden's four-day training session in Sydney about six weeks ago, so it may take me a while to get my head around what you fellas have just posted. Sounds like there's a definite solution to my problem, though, so thanks for the replies :-)
gzevin
you could always ask us at the head office - in many cases we'll help you straightaway with your inquiries
Greg Zevin, Ph.D. Comp. Sc.
Independent Interwoven Consultant/Architect
Sydney, AU