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)
Regenerate pages automatically
Markandeyulu
Hi I have one dcr that is using multiple tpl's to generate multiple htmls pages across different directories inside a work area..
I need to write a workflow where a user comes and changes the dcr .. all the associated html pages and when the user tries to save and close it needs to pop up a small window that asks him if he needs to regenerate all teh associated html's with that particular dcr and when he clicks and yes it needs to invoke the regenerate script and regenerate all the associated html's with that particular dcr...
I don't know how i can call the associated htmls to one particular dcr...
is there a way or is there a sample alogirthm any one can give me..
Find more posts tagged with
Comments
akshathp
You could
1. create a workflow on tt_data event
2. have an external task in the workflow which invokes a custom ipl
3. have the code to find the files and regenrate in that ipl file.
4. to detect the filenames, you could read the EAs of the files
Not sure if this would be the best approach as reading the EAs for the files and fetching the desired names could take slightly longer time unless you have any other criteria to detect the filenames. I mean, maybe you have all these generated pages only in one particular section of your site structure.
Hope this helps!
Akshat Pramod Sharma
Interwoven Inc.
Johnny
instead of registering multiple tpl's to manually generate.
try using iw_ostream inside of a 'primary' template that then calls all the other tpl's.
that way they will all be generated so long as you can determine the path.
John Cuiuli
Gregg Faus
I use an approach similiar to akshat. I have a workflow which recognizes an extended attribute (FileDestination) and performs logic based this value. Two things can happen:
1) Value is set. Just regenerate the file and output it again to the value specified in FileDestination.
2) Value is not set. Use a lookup XML document that checks the DCR's directory name as a key to what template category to process the DCR as.
Very general description I know. I'm surprised there isn't an out of the box workflow for something like this. I would never trust my clients' to generate pages and name them correctly. That is why all of it is done behind the scenes in workflow and the generate button is disabled.
Markandeyulu
Hi gregg... Is there a algorithm or any sample code u have done that u can send it across to me.
Really appreciate if u can do that...
Thanks in advance.
Gregg Faus
Give me your e-mail and I'll send you a copy of what I can provide.