PEAR Forum :: PHP Extension and Application Repository

PEAR Forum Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
Preserve Backslashes? HTML_Template_IT

 
Post new topic   Reply to topic    PEAR Forum Forum Index -> HTML
View previous topic :: View next topic  
Author Message
CuppoJava



Joined: 02 Jun 2008
Posts: 1

PostPosted: Mon Jun 02, 2008 11:59 pm    Post subject: Preserve Backslashes? HTML_Template_IT Reply with quote

Hi,
I'm using HTML_Template_IT package in my program, and I need for the package to preserve my strings with the backslashes.
ie. don't treat them as escape characters.

in the example below
$user->getFirstName() returns "\\\\\\\\\\\\\\\\\\\\\"

but the template only displays "\\\\\\\\"


$opt = array('preserve_data' => true, 'use_preg'=>false);
$template = new HTML_Template_IT("./templates", $opt);
$template->loadTemplatefile("ProfilePanel.tpl", true, false);

$template->setCurrentBlock("MAIN");
$template->setVariable("FIRSTNAME", $user->getFirstName());

I thought preserve_data would have worked. But it didn't and now I'm quite stuck. Thanks a lot for your help.
-Cuppo
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    PEAR Forum Forum Index -> HTML All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



PEAR Forum topic RSS feed 
Powered by phpBB © 2001, 2005 phpBB Group

Provided by Ministry of Web developement

'Actiemonitor' online projectmanagement software