requested function for ITX
| From: | Dan Allen | Date: | Tue, 21 May 2002 04:30:34 +0000 |
| Subject: | requested function for ITX | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-6261@lists.php.net to get a copy of this message | ||
It would be nice if there was a function blockExists()...some
templates might eliminate a block because they don't want the
content that it contains, then in the code you need to handle the
case that the block is missing. I could use placeHolderExists...but
since the naming scheme is different for blocks I have to do
if ($tpl->placeHolderExists('__MYBLOCK__')) {
}
so blockExists should just do
function blockExists($block, $parentBlock) {
return $this->placeHolderExists('__' . $block . '__', $parentBlock);
}
Dan