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)
Generate
Tob
When a file is generated from a saved DCR, the user is presented with an explorer like window which allows them to browse to the location where this file should be saved.
Is there a way to control the default location of this window? Example: I have a certain template which requires users to save to a directory buried deep within the directory structure. If I could bring them to this directory by default it would save them many mouse clicks.
Find more posts tagged with
Comments
Migrateduser
At present, the recommended way to achieve this is to use a workflow to generate output, rather than simply having users do ad-hoc generation. In the workflow you can define variables to set the output path and automatically invoke iwgen or iwpt_compile.ipl, without user interaction/error.
bw
Bob Walden [bob.walden@interwoven.com]
Interwoven Education Group
IM: Yahoo, MSN bob_walden
gzevin
Recommended? by who????
It could be more tnan 1 way of achieveing this. Yes, the workflows SOMETIMES could harcode the path, and even the name of an output file.
However, one could prefer to generate files themselves, and to setup a default output directory one could use:
<directory dir-regex=".*" /> tag in templating.cfg
Migrateduser
the dir regex doesn't set a default, it stops someone from generating to a path that does not match the regex. Sadly, the user does not know ahead of time what the regex *is*--he only finds out if he tries to save to a disallowed location. So setting the dir-regex is a good idea, yes, but does not unfortunately set a default for the user.
I'll concede, though, that perhaps workflow is not the universally-preferred method--just in my experience. Perhaps other methods of making sure the output goes to the correct location would be possible with FormAPI, and of course a custom menu item calling a CGI program could do it too.
bw
Bob Walden [bob.walden@interwoven.com]
Interwoven Education Group
IM: Yahoo, MSN bob_walden
gzevin
one of my former clients is actually moving away from 'hardcoded' DCRs, etc towards a more 'kosher' teamsite way of generation/naming.
yes, the dir regex is not a saviour, at least it's something....
Interwoven Consultant/Architect
seeDerekNow
This has got to be one of the most common question among users. Does anybody have an example of a solution? I remember putting in a feature request for this way back since the 4.x days.
Derek
Migrateduser
autoname the DCR for the user with FormAPI. For instance, give them a field in the DCR where they enter the file name, and do the validation on that. On the first save validate it and make sure it does not contain spaces. If you set up a virtual directory to local/config you can read templating.cfg with the XML parser that's available with IE and look at the directory-path, or you could hard-code it in the DCT. So the DCR will be saved to a subdirectory of data for that category/type, but that directory has to exist in advance. After save (or a reload) make it read-only so it can't be changed. Then have workflow default the output file based on the directory that the DCR is in relative to data.
It's a major hassle but when it works, it's very convenient for the users.
Migrateduser
Can you provide an example of autonaming a DCR through FormAPI? Thanks.
james1
Please look at the out-of-the-box FormAPI examples.
-- James
--
James H Koh
Interwoven Engineering