PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » HTML » HTML_Template_Sigma » Bug #818

No parsing with replaceBlockFile()

Details

Submitted2004-02-21 12:16 UTC
Fromreg at dav-muz dot net
StatusBogus
PackageHTML_Template_Sigma
PHP Version4.3.4
OSLinux Slackware9.1 Kernel2.4.22
Roadmaps(Not assigned)

Comments

[2004-02-21 12:16 UTC] reg at dav-muz dot net

Description:
------------
HTML_Template_Sigma ver1.0.2 (1.9)
When I use replaceBlockFile('block', 'template.tpl', [TRUE|FALSE] ) the block will be replace with the file, but the file will not be parse!
I have test also with parse().

This procedure is for use the dinamic include.

Reproduce code:
---------------
[main.tpl]
<!-- BEGIN replace -->
<!-- END replace -->

[template.tpl]
Hello! This string run.
<!-- BEGIN block -->
<!-- END block -->

[parse.php]
$Tpl->loadTemplateFile('main.tpl');
$Tpl->replaceBlockFile('replace', 'main.tpl', TRUE ); // Also tested with FALSE
$Tpl->parse(); // Also tested with parse('block')
$list = $Tpl->getBlockList();
print $list[0] . " " . $list[1]; // $list[0]=='replace', $list[1]==null.

Expected result:
----------------
The blocks that are in "template.tpl" are fund.

Actual result:
--------------
null

[2004-02-21 15:10 UTC] reg at dav-muz dot net

Sorry, is an error with getBlockList made by my english, I have not understend the documentation. ^_^