FAQ
Edit report at http://pear.php.net/bugs/bug.php?id=17877&edit=1

ID: 17877
Updated by: asheidan@gmail.com
Reported By: asheidan at gmail dot com
Summary: Not always replacing placeholders in added
blocktemplates
Status: Open
Type: Bug
Package: HTML_Template_IT
-Operating System: MacOSX
+Operating System: MacOSX (propably all)
Package Version: 1.3.0
PHP Version: 5.3.2
Roadmap Versions:
New Comment:

-Operating System: MacOSX
+Operating System: MacOSX (propably all)



Previous Comments:
------------------------------------------------------------------------

[2010-09-20 22:11:44] asheidan

Description:
------------
When adding another template with addBlockfile placeholders
aren't replaced as they should. If a placeholder is present in both
of the templates it's only replaced in the "outer" template.

Test script:
---------------
### outer.tpl #########
List:
<!-- BEGIN ITEM -->
* {bar}
<!-- END ITEM -->
{foo}

### inner.tpl #########
{foo} lorem ipsum

### script.php #########
require_once('HTML/Template/ITX.php');

$tpl = new HTML_Template_ITX();

$tpl->loadTemplateFile('outer.tpl');

$tpl->addBlockfile('bar','INNER','inner.tpl');

$tpl->setCurrentBlock();
$tpl->setVariable('foo',"monkey");

$tpl->show();


Expected result:
----------------
List:

* monkey lorem ipsum

monkey

Actual result:
--------------
List:

monkey

------------------------------------------------------------------------

Search Discussions

  • Asheidan at Sep 21, 2010 at 10:58 am
    Edit report at http://pear.php.net/bugs/bug.php?id=17877&edit=1

    ID: 17877
    Updated by: asheidan@gmail.com
    Reported By: asheidan at gmail dot com
    Summary: Not always replacing placeholders in added
    blocktemplates
    Status: Open
    Type: Bug
    Package: HTML_Template_IT
    -Operating System: MacOSX (propably all)
    +Operating System: MacOSX (probably all)
    Package Version: 1.3.0
    PHP Version: 5.3.2
    Roadmap Versions:
    New Comment:

    -Operating System: MacOSX (propably all)
    +Operating System: MacOSX (probably all)



    Previous Comments:
    ------------------------------------------------------------------------

    [2010-09-21 10:57:30] asheidan

    -Operating System: MacOSX
    +Operating System: MacOSX (propably all)


    ------------------------------------------------------------------------

    [2010-09-20 22:11:44] asheidan

    Description:
    ------------
    When adding another template with addBlockfile placeholders
    aren't replaced as they should. If a placeholder is present in both
    of the templates it's only replaced in the "outer" template.

    Test script:
    ---------------
    ### outer.tpl #########
    List:
    <!-- BEGIN ITEM -->
    * {bar}
    <!-- END ITEM -->
    {foo}

    ### inner.tpl #########
    {foo} lorem ipsum

    ### script.php #########
    require_once('HTML/Template/ITX.php');

    $tpl = new HTML_Template_ITX();

    $tpl->loadTemplateFile('outer.tpl');

    $tpl->addBlockfile('bar','INNER','inner.tpl');

    $tpl->setCurrentBlock();
    $tpl->setVariable('foo',"monkey");

    $tpl->show();


    Expected result:
    ----------------
    List:

    * monkey lorem ipsum

    monkey

    Actual result:
    --------------
    List:

    monkey

    ------------------------------------------------------------------------
  • Gregory Currie at Sep 21, 2010 at 4:56 pm
    Edit report at http://pear.php.net/bugs/bug.php?id=17877&edit=1

    ID: 17877
    Updated by: gregory.currie@gmail.com
    Reported By: asheidan at gmail dot com
    Summary: Not always replacing placeholders in added
    blocktemplates
    -Status: Open
    +Status: Assigned
    Type: Bug
    Package: HTML_Template_IT
    Operating System: MacOSX (probably all)
    Package Version: 1.3.0
    PHP Version: 5.3.2
    -Assigned To:
    +Assigned To: gregorycu
    Roadmap Versions:
    New Comment:

    -Status: Open
    +Status: Assigned
    -Assigned To:
    +Assigned To: gregorycu



    Previous Comments:
    ------------------------------------------------------------------------

    [2010-09-21 10:58:08] asheidan

    -Operating System: MacOSX (propably all)
    +Operating System: MacOSX (probably all)


    ------------------------------------------------------------------------

    [2010-09-21 10:57:30] asheidan

    -Operating System: MacOSX
    +Operating System: MacOSX (propably all)


    ------------------------------------------------------------------------

    [2010-09-20 22:11:44] asheidan

    Description:
    ------------
    When adding another template with addBlockfile placeholders
    aren't replaced as they should. If a placeholder is present in both
    of the templates it's only replaced in the "outer" template.

    Test script:
    ---------------
    ### outer.tpl #########
    List:
    <!-- BEGIN ITEM -->
    * {bar}
    <!-- END ITEM -->
    {foo}

    ### inner.tpl #########
    {foo} lorem ipsum

    ### script.php #########
    require_once('HTML/Template/ITX.php');

    $tpl = new HTML_Template_ITX();

    $tpl->loadTemplateFile('outer.tpl');

    $tpl->addBlockfile('bar','INNER','inner.tpl');

    $tpl->setCurrentBlock();
    $tpl->setVariable('foo',"monkey");

    $tpl->show();


    Expected result:
    ----------------
    List:

    * monkey lorem ipsum

    monkey

    Actual result:
    --------------
    List:

    monkey

    ------------------------------------------------------------------------

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedSep 21, '10 at 10:57a
activeSep 21, '10 at 4:56p
posts3
users2
websitepear.php.net

2 users in discussion

Asheidan: 2 posts Gregory Currie: 1 post

People

Translate

site design / logo © 2022 Grokbase