Hi all
I have a tpl file and I wan't to call a perl function with an argument.
I have found one way to do this but it's via a variable, and I cant's use argument then (also not so good in a replicant).
I want a perl call that can have a dcr value as argument, from my content, is that possible
This is what i have:
<?xml version="1.0" encoding="UTF-8"?>
<iw_pt name="Popup Page">
<iw_perl>
<![CDATA[
my $mainPageContent = cleanText(iwpt_dcr_list('dcr.main.page.content'));
sub MyFunction{
($arg1) =
@_;
return $arg1 . " test"; #return argument plus a litle string
}
]]>
</iw_perl>
<![CDATA[
<html>
<body>
{iw_value name='$mainPageContent'}
</body>
</html>
]]>
</iw_pt>
And this is what i kinda want:
<?xml version="1.0" encoding="UTF-8"?>
<iw_pt name="Popup Page">
<iw_perl>
<![CDATA[
my $mainPageContent = cleanText(iwpt_dcr_list('dcr.main.page.content'));
sub MyFunction{
($arg1) =
@_;
return $arg1 . " test"; #return argument plus a litle string
}
]]>
</iw_perl>
<![CDATA[
<html>
<body>
{iw_value name='MyFunction('dcr.main.page.content')'} <!-- shall result in "here is a litle test" -->
</body>
</html>
]]>
</iw_pt>