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)
set output path in DCR in preview mode
tejul
Hi,
I populated the output path of my generated files automatically in my DCR and it worked fine in the 'edit' mode with the formApi function.
However, with the preview mode, it did not work... I didn't find any solution with metadata neither with the viewoption in the templating.cfg.
In our architecture, one dcr can provide one and only one html page. The final user should not be able to choose his path even the name of the file...
Is there a solution ?
many thanks
Find more posts tagged with
Comments
Adam Stoller
When you say "preview mode" - are you talking about "Preview" where the files get generated with zz_* filenames, or are you talking about clicking on the link of a DCR so that it comes up in view-mode rather than edit-mode ?
I'll assume you're talking about the former.
My customer gets around this by disabling Preview (and Generate) functions from the GUI and *only* allowing page generation to take place within the contxt of a workflow (which is also where the DCR creation takes place).
You might need to do something similar.
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
tejul
Hi
I was talking about clicking on a link of the dcr. Thanks for your quick answer !
Adam Stoller
My answer was with respect to doing a Preview generation - not clicking on the link of the DCR -- so my assumption was wrong.
Clicking on the link of a DCR, and thus bring it up in "view-mode" rather than "edit-mode" means that the FormAPI code will NOT run - and so any customizations you use FormAPI to hide/expose/set/re-set/etc - will NOT occur when you bring the DCR up in "view-mode".
The same solution I proposed before does still apply here though - which is if the only way to generate pages from a DCR is through a workflow - then it doesn't matter if they view the DCR in "view-mode" because they still won't be able to generate from that view directly ... well, at least not in 6.x. In 5.x you need to use FormAPI code to disable the Preview and/or Generate buttons and, as I just stated before, FormAPI code won't run when viewing a DCR in view-mode - so they'd be able to click on the Preview and/or Generate buttons in such a case (if they're shown? I don't remember).
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
tejul
I am using teamsite 6.1 so it don't have any problem to hide the 'preview' and the 'generate' button.
I have got maybe another solution... It is to create my own "generate" button, so on a preview, customers won't be able to generate anything... But as I am a new templating developper, I don't know for the moment the side effects...
Anyway thanks for your time !