Home
TeamSite
parse value to Logfile
Bhargav Coca
I am trying to parse value into a logfile form the tpl. Its very simple and many of us have done it in many ways, I am trying the following way and not getting it right. Can you point me my mistake.
TPL Snippet:
[html]
print LOGS "<mytitle>";
print LOGS "{iw_value name='rebvar.main_section.main_title'/}";
print LOGS "</mytitle>";
[/html]
This prints the whole statement, not the value though. What is wrong here?
Thanks
Find more posts tagged with
Comments
nipper
First get rid of the CDATA. You should not need them, there have been plenty of threads about that.
Second you do not need 3 different iwperl tags, one with print statements will work
Third change this
print LOGS "{iw_value name='rebvar.main_section.main_title'/}";
to
print LOGS iwpt_dcr_value('rebvar.main_section.main_title');
prithvi
I second nipper lilleywhite. Strip off CDATA and add your Perl script within ...... .
print LOGS "\\n";
print LOGS iwpt_dcr_value('rebvar.main_section.main_title'/);
print LOGS "\\n";
This will do the trick.