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)
preview functionality with custom files
System
I would like to know how the Preview engine works. That is, how does it generate the filename to use for a preview? ALso how does the system clean up these preview files?
Reason I ask is becauase I have a TPL that not only generates the HTML file, but also runs Apache FOP to generate a PDF file. During preview I would like the user to preview the PDF as well (i do this by providing a link to the pdf on the html page). I would then like Teamsite to clean up my preview PDF file as well, like it does the HTML file. Is this possible... if so, any suggestions. I was trying to figure out how TST generates the filename "zz_tst_user_0_preview", but I'm not sure what the "0" is and i'm also not sure if TS will pick up the PDF is it is named like that.
-Mukesh
-mukesh
Find more posts tagged with
Comments
LooseCannon
I just finished a project w/the same requirements...
What I did was:
1) Generate a PDF to the dir catagory/type/presentation/PDF/preview and named it with the users login ID (ie xxxx.pdf).
2) Checked for any errors
3) If no errors I redirect them to the PDF using javascript
4) If errors I post a message and don't redirect them
This way only one preview file exists per user.
Let me know if this helps.
Migrateduser
Hi, Thanks for the quick reply.
I do the error checking and stuff like you suggested and everything works fine. Where I am looking for help is cleaning up the preview PDF files after the user is done, just like the preview files that are created by teamsite and cleaned up after an hour or so. I want the PDF files to just piggy back on that system. So when I do create the preview PDF file, it is named in such a way that the clean up system in teamsite picks it up for deletion. Otherwise, I would have like tons of preview PDF files in the system and I would have to manually delete them or run some job to do that. I'd like to use built-in TS functionality though.
-Mukesh
LooseCannon
I completely understand your situation, just going down that same road. I'm working w/Teamsite 5.5.2 and the "out-of-box" preview functionality will keep only one preview file per user, per workarea. It never deletes a temp-preview file, just overwrites the same one for that user. Which is what I do by creating a preview-PDF w/the users name. Every time the user previews a DCR w/the PDF presentation the preview-PDF will be overwritten.
I haven't talked to many using FOP, so just curious as to what version of FOP you are using?
Adam Stoller
Not sure this will help - but if you use an explict naming convention for the generated PDF - you can use that same convention in autoprivate.cfg - the file won't be deleted, but it will prevent it from getting submitted to staging...
--fish
(Interwoven Senior Technical Consultant)
Migrateduser
I believe we are using FOP 0.20.5. So I guess there is no teamsite feature that cleans up temp files. I guess we can write something that will do that function.
Thanks all for you help!
-Mukesh