-- Christoph Dorn <[EMAIL PROTECTED]> wrote
(on Friday, 05 September 2008, 10:14 AM -0700):
> 
> > Easiest way is to use content capturing:
> >
> >     <?  $this->dojo()->accordionContainer()->captureStart('identifier', 
> > $params, $attribs) ?>
> >     <?= $this->dojo()->contentPane('paneIdentifier2', $content, $params, 
> > $attribs) ?>
> >     <?= $this->dojo()->contentPane('paneIdentifier2', $content, $params, 
> > $attribs) ?>
> >     <?= $this->dojo()->accordionContainer()->captureEnd('identifier') ?>
> >
> > $params and $attribs are always optional; $params are Dijit parameters,
> > $attribs are HTML attributes.
> >
> > The captureStart/captureEnd pairs can also be used with the contentPanes
> > themselves, using the same syntax as for the container.
> >   
> 
> Nearly there. I don't like using the <?= syntax so I have:
> 
> print $this->accordionContainer()->captureStart(

You shouldn't do this, but you already know that...

>     'accordion1',
>     array('title' => 'Pane Title'),
>     array('style' => 'background-color: lightgray;'));
> print $this->accordionPane(

oh, and use echo. echo is a language construct, print is a function.
echo operates faster. Minor optimization.

>     'p1',
>     'Pane 1 Content',
>     array('title' => 'Pane 1 Title'),
>     array('style' => 'background-color: lightgray;'));
> print $this->accordionPane(
>     'p2',
>     'Pane 2 Content',
>     array('title' => 'Pane 2 Title'),
>     array('style' => 'background-color: lightgray;'));
> print $this->accordionContainer()->captureEnd('accordion1');
> 
> 
> Now according to your sample I should omit the "print" for the first
> $this->accordionContainer() BUT if I leave it out it does not work.
> Problem is if I leave it in in inserts an extra "1" inside the accordion
> div.

Odd. I just ran your exact example through, both with and without the
initial print statement, and it worked fine. 

-- 
Matthew Weier O'Phinney
Software Architect       | [EMAIL PROTECTED]
Zend Framework           | http://framework.zend.com/

Reply via email to