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)
execution of tpl's
amaresh
Hi thanks in advance,
I am trying to execute T1.tpl and would like to see the output in T2.tpl, when executed. (ie) when T2.tpl is executed, it should display its output as well as it should also contain the output from T1.tpl. Both T1.tpl and T2.tpl should be executed dynamically. Can anyone help me please?
amaresh
Find more posts tagged with
Comments
Nicholas
One way of doing this task, you can write whatever output in a file and you can read the content of this file in another TPL.
Let me know iif you are facing some problem.
Thanks Nicholas
Adam Stoller
Are T1.tpl and T2.tpl processing the same DCR or different DCRs?
There's a fairly recent thread about the use of iwpt_include with main and component PTs and DCRs which may answer your question.
If not - I think you'll have to provide a bit more detail about what you're trying to do, how you're trying to do it, and the environment in which you are trying to do all of this (platform, product versions, etc.)
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
maggi
let's assume T1 is the component template and T2 is main template where u want to include T1 result also.
In T1 use iw_arg and T2 use iw_include to make reference and get the content here in T2.
In T1, have this code (change the path, item address based on ur needs) before ur items
<iw_perl><![CDATA[
my $dcrname = $iw_arg{dd_dcr};
my $DCR = "/iwmnt/sales_portal_ui_dev/main/sales_extranet/WORKAREA/default/templatedata/template_admin/menu_admin/data/dropdown/" . $dcrname;
my $this_dcr = iwpt_load_dcr( $DCR, dcrlocal, t);
]]> </iw_perl>
When u reference the items, like "dcr.menu.head", change it to "this_dcr.menu.head"
In T2, (based on component dcr name, we r getting the output of that dcr here in main template.
<iw_if expr="{iw_value name='access.insert_dropdown'} ne ''">
<iw_then>
<iw_include pt='/iwmnt/sales_portal_ui_dev/main/sales_extranet/WORKAREA/default/templatedata/template_admin/menu_admin/presentation/default.tpl' mode='ptlocal' >
<![CDATA[
$iw_param{dd_dcr} = iwpt_dcr_value('access.insert_dropdown');
]]>
</iw_include>
</iw_then>
</iw_if>
Hope this helps you.
I should thank to Ghoti for helping me to understand this relationship.
Maggi
amaresh
Thanks a lot,
It worked for me.
amaresh