Re: HTML_Template_Sigma and nested blocks

From: Date: Sun, 01 Aug 2004 12:57:28 +0000
Subject: Re: HTML_Template_Sigma and nested blocks
References: 1 2  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-13932@lists.php.net to get a copy of this message
On Sun, 01 Aug 2004 10:47:17 +0400, Alexey Borzov <borz_off@cs.msu.su> wrote: > Hi, > > > > Jon Wood wrote: > > I'm trying to use HTML_Template_Sigma with a block like this: > > > > <!-- BEGIN submenu --> > > <div id="submenu"> > > <ul> > > <!-- BEGIN admin --> > > <li><em><a href="{base_href}admin/addpage">Add > > Page</a></em></li> > > <!-- END admin --> > > </ul> > > </div> > > <!-- END submenu --> > > > > And then doing: > > > > if ($admin) { > > $tpl->touchBlock('admin'); > > $tpl->hideBlock('submenu'); > > } > > > > But the hideBlock call returns an error saying that the block couldn't > > be found. Am I doing something wrong, or is this not supported? > > 1. If it returns such an error, then the block is really not found. There is > most probably some issue with your template. Can you see anything wrong with it, because that's the only place I'm having problems like this. > 2. The code will not work as desired even if the block is found. If outer block > is hidden, you will not be able to see its inner blocks... That's the idea - the submenu Add Page link should only be visible in some places.

« previous php.pear.general (#13932) next »