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)
Passing a DCR name into a TPL
brooke
Hello workflow experts!
I'm hoping to find the best way to "pass" the name of the DCR that instantiated the workflow into a TPL file that we will be utilizing. We will be not only creating an HTML page from the TPL file, but also utilizing Perl logic within the TPL.
So the question is... how can I make that TPL "know" the name of the DCR so it can use it in its logic?
Thanks so much!
Brooke
Find more posts tagged with
Comments
Gregg Faus
This chunk of code will assign the DCR being used in the TPL to the variable $dcr_name:
<iw_perl><![CDATA[
$dcr_name = iwpt_get_dcr_name();
]]></iw_perl>
Migrateduser
I'm a little confused about the question you are asking, but if my assumption is correct, the answer is independent of whether it is occuring in a workflow or not.
Basically, you want to generate a page and some logic in your tpl requires that you know the name or path of the DCR being used, correct? If so, just use an <iw_perl> element, and call iwpt_get_dcr_name().
You can find the documentation for it with:
perldoc TeamSite:
T::iw_perl
Cheers,
Rob Huffstedtler
rob@bagpipe.com
brooke
Thank you <ghaus> and Rob!! I didn't think it was that easy -- but it looks like it will be
.
baretto
Brooke,
something like:
my $dcrname = iwpt_get_dcr_name();
in the TPL will get the name of the DCR. If you are using WF to call a script that generates the html, you could set a WF variable or a task variable in the WF, then reference the variable in the generation script.
brooke
Thanks baretto, that's exactly it! Have a wonderful day
.