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)
Can a TPL know its own file path?
BENMAY
I am trying to put some perl code into a TPL which needs to know the file path of the TPL itself. Is there a way to obtain this? Thanks!
Find more posts tagged with
Comments
akshathp
How about using this code
<iw_perl><![CDATA[
my($pt, $dcr, $ofile, $wkarea);
for(my $i = 0; $i <
@ARGV
; $i += 2){
$pt = $ARGV[$i+1], next if ($ARGV[$i] =~ /^-pt$/);
$dcr = $ARGV[$i+1], next if ($ARGV[$i] =~ /^-iw_pt-dcr$/);
$ofile = $ARGV[$i+1], next if ($ARGV[$i] =~ /^-ofile$/);
$wkarea = $ARGV[$i+1], next if ($ARGV[$i] =~ /^-iw_include-location$/);
}
]]></iw_perl>
Hope this helps!
Akshat Pramod Sharma