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)
Autonoming generated files.
System
HI
I need to set the name of the xml/html i generate as <dcr_name>.xml/html
How can i achieve this, i am able to get the dcr name by using iwpt_get_dcr_name();
I could also figure out that iwpt_get_ofile_name(); gets me the name of generated file, which i enter in the save dialog box, I need to set this name to the <dcr_name>.xml/html!
Thanks and regards
Dixit
Find more posts tagged with
Comments
Nidhi_Agrawal
You can use this on an ipl file.
$tplinuse ="\\default\\----\presentation\\tpl_name.tpl";
$dcrinuse ="\\default\\----\data\\dct_name.dcr";
$outputfile ="\\default\\----\html\\$dcrname.htmll";
$gen_cmd = "$iwhome/bin/iwgen " . " -t " . $tplinuse . " -r " . $dcrinuse . " " . $outputfile;
system($gen_cmd);
This will read the dcr file and automatically generate the html file on the basis of tpl file.
U can iterate this code for all the dcr name also.
Nidhi
Migrateduser
Hi Nidhi
Thatshould work! But then i have to run the ipl seperately Right? But the people who will be using the template will not have excess to my server to run the files. They have to click on the generate button to generate the files. Now if i can trigger the proposed ipl, when the user clicks on generate but on the DCR , this can be achieved .
Nidhi_Agrawal
Ya ,this code will work for that only.
But i think ur problem can be solved in very easy way.
There shud be some way to display default name of generated file.
If i can find then i will share with u .
Nidhi...
Adam Stoller
Use a workflow and/or custom menu items (or DCT form callouts) to implement preview and/or generate functions so that the naming of the output file is handled programmatically and the user is *never* prompted for it.
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
Migrateduser
Thanks Nidhi , It would be great if you can help me out!
Hi ghoti,
I will surely trry this, but i haven't worked much on this line, if you could give me a start , i will surely build on that. I could understand from your post that if i use a callout from the DCR i can do it. But Is it possible to trigger an ipl if i click on the teamsite provided " Generate" button, If yes, is it possible to implement this functionality for r 2 or 3 templates(DATATYPES) from about 15 templates in a WORKAREA??.
Thanks
Amit Dixit
Adam Stoller
While it might be possible to do it with the OOTB menus using PT hacks - you'll generally be better served by automating the process as a whole rather than trying to do a patch-quilt job on it.
If you don't have much experience - read, take training, and/or hire someone who does have experience to assist you.
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
jkm
As Adam has suggested above to use the Workflow, a small addition in that, u can call your WF on click of Finish button and then it can do the desired task very easily. In tht WF call for an external to get the DCR name and generate html file with name watever u require
Migrateduser
HI ghoti,
I was wondering , is there a way i can hide the generate button on the DCT in TS 5.5.Iinstead of that i will introduce a CGI callout in the DCT to generate the xml/html?
Thanks and regards
Dixit
jbonifaci
As far as I know, there was never a supported way to do this in 5.5. 5.5 has been end of life'd and I would seriously consider upgrading to either 6.5 or 6.7 when it is released if I were you.
That aside, if you really want to remove the generate button, you could probably do so with some hacked javascript. I rarely condone hacks though, as they are obviously unsupported.
~Jeff
Adam Stoller
In 5.5. you could use FormAPI code to *override* the generate button and replace it with an alert message or some such to prevent it from functioning in its normal capacity.
As already mentioned though, 5.5 is "dead" - upgrade as soon as possible.
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
Migrateduser
hi ghoti
Can you please suggest some example how to do so, i tried the manuals but could not get a way to do so! The upgradation is on cards and will be done soon, till then i will have to work on 5.5. Kindly help as soon as possible.
Thanks and regards
Dixit
Adam Stoller
I don't remember the details, but basically you had to determine which button was pressed (there were constant values for each of them) and build up a case statement or series of if-else statements to handle the different possibilities.
If memory serves correct - I got most of the original code from DevNet in the first place - so you might be able to find it if you search a bit - otherwise I'd just put it down as something that you'll fix after the upgrade, which put more weight behind getting the upgrade done sooner (as if having actual support isn't sufficient reason?)
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com