Hi...
I think i have problem using Zend Layout and Zend Dojo Container.. it
only work when placing container codes in View Script but does not
work in Layout.. for example I want to enclose
$this->layout()->content with Content Pane..
please help
2008/11/26 Matthew Weier O'Phinney <[EMAIL PROTECTED]>:
> -- Superbiji » <[EMAIL PROTECTED]> wrote
> (on Wednesday, 26 November 2008, 04:21 PM +0700):
>> Hi All..
>> i've been trying zf 1.7 and add accordionContainer but without
>> success..... please can anyone give me full examples? can't find it in
>> manual yet.
>>
>> in my action:
>> function dojoformAction() {
>> Zend_Dojo::enableView($this->view);
>>
>> }
>>
>> view:
>>
>> <?= $this->dojo()->enable(); ?>
>>
>> </head>
>> <body class=tundra>
>>
>>
>> <?= $this->accordionContainer(
>> 'foo',
>> $content . "XXXXXXXXXX",
>> array(
>> 'duration' => 200,
>> ),
>> array(
>> 'style' => 'width: 200px; height: 300px;',
>> ) );
>> ?>
>
> This is a classic mistake -- you're rendering the dojo() view helper
> *before* any methods that would populate it have been called.
>
> The easy solution is to capture the content of your accordionContainer()
> call *prior* to doing so, and then echo that content; I've done
> similarly in the pastebin example application, only I do so by rendering
> another view script.
>
> As an example, modify your layout script as follows:
>
> <? $container = $this->render('bodyAccordion.phtml'); ?>
> <?= $this->doctype() ?>
> <html>
> <head>
> ...
> <?= $this->dojo() ?>
> </head>
> <body class="tundra">
> <?= $container ?>
> </body>
> </html?
>
> and then, in bodyAccordion.phtml:
>
> <?
> $this->dojo()->enable();
> echo $this->accordionContainer(....);
>
--
Kamus Online - http://kamus.landak.com/