|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
cennot Smarty Rookie
Joined: 19 Sep 2011 Posts: 6 Location: NRW / Germany
|
Posted: Thu Jun 21, 2012 1:59 pm Post subject: Block-"hide"-flag fails if nested and uses child-c |
|
|
Bug: If a block is nested in an other block and uses $smarty.block.child the "hide"-flag fails. The block-contents are displayed although there is no child-block with the same name:
Index.php
Code: |
<?php
// SVN: $Id: Smarty.class.php 4614 2012-05-24 15:13:19Z rodneyrehm $
include_once dirname(__FILE__).'/Smarty-3.1.10/Smarty-3.1.10/libs/Smarty.class.php';
$smarty = new Smarty();
$smarty->setTemplateDir(dirname(__FILE__));
$smarty->display('main.tpl');
|
main.tpl
Code: |
{extends file="index.tpl"}
{block name="index" prepend}
{block name="test" hide}
I should be hidden.
{$smarty.block.child}
{/block}
{/block}
|
index.tpl
Code: |
{block name="index"}
IndexContents
{/block}
|
Expected Result
Output
Code: | I should be hidden.IndexContents |
|
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Sat Jun 30, 2012 3:53 pm Post subject: |
|
|
This has been fixed now in the SVN trunk and will later be included in 3.1.11 |
|
Back to top |
|
cennot Smarty Rookie
Joined: 19 Sep 2011 Posts: 6 Location: NRW / Germany
|
Posted: Mon Jul 02, 2012 1:23 pm Post subject: |
|
|
Thank you very much! |
|
Back to top |
|
|
|
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
|
Powered by phpBB © 2001, 2005 phpBB Group
|