By: Peter
Date: 2011-10-24
Time: 02:50
|
Trying to pull html tages through but they are not interpreted at run time
Hello,
I am new to tbs and think it is just what I need so I like to make it work. Anyway, I have a template and php files that work, see below. Now in the php file I want to add html tags to my $message variable and like this to be interpreted by the browser. Instead the <b> and </b> tags are shown as text. Where do I go wrong?
Thanks
template:
<html>
<body>
[onshow.message]
</body>
</html>
php file:
<?php
include_once('./config.inc.php');
// main body of the page
$message = <<<PARA
This is a <b>multi-line assignment</b>.
Newlines are preserved, and
$vars are interpolated.
PARA;
$TBS =& new clsTinyButStrong;
$TBS->LoadTemplate('./tpl/template.htm');
// Show template
$TBS->Show();
|
By: Skrol29
Date: 2011-10-24
Time: 21:45
|
Re: Trying to pull html tages through but they are not interpreted at run time
Hi Peter,
The template engine cannot know if you wish to convert the content to HTML or to keep it "as is" in order to take place as valid HTML source.
By default, TBS convert all content to XML/HTML. You can avoid this behavior at the level of the TBS field using parameter "htmlconv=no", or at the template level using a chartset equal to "false" when you load the template.
Regards,
|
By: Peter
Date: 2011-10-25
Time: 02:50
|
Re: Trying to pull html tages through but they are not interpreted at run time
Skrol29,
I liked the [var.message;htmlconv=no] solution and works like a charm!
Thanks,
Piet
|
|
Posting in progress.
Please wait...
|