2008年11月7日星期五

Re: [fw-mvc] Dojo nested tabContainer not displaying

-- barry hembree <gbhembree@comcast.net> wrote
(on Friday, 07 November 2008, 06:11 AM -0800):
>
> Hi All,
>
> I am trying to do a page that has nested tabContainers. The main page is a
> tabContainer and in one of the tabs I have some content and another
> tabContainer. The inner tabContainer is not displaying. I look at the page
> source and the content of the tabs is there. The inner tabContainer also
> seems to be present in firebug. Below is the relevant code snippets. Any
> ideas?
>
> *** code from _home.phtml (the first tab of my outer tabContainer) ***
>
> <?= $this->contentPane()->captureStart('news', array('title' => 'News',
> 'class' => 'news-tab')) ?>

First, don't echo when calling captureStart(), as that method returns a
boolean. Only the captureEnd() directive should be echoed (or captured
in a variable). You do it correctly later:

> <h3>News and Views</h3>
> <? $this->tabContainer()->captureStart('news_views', array('class' =>
> 'nv-tab')) ?>

This one is correct.

> <?= $this->render('index/_late.phtml') ?>
> <?= $this->render('index/_most.phtml') ?>
> <?= $this->tabContainer()->captureEnd('news_views') ?>
> <?= $this->contentPane()->captureEnd('news') ?>

So far, looking fine...

> *** code from _late.phtml (just some dummy code for now) ***
> <?= $this->contentPane()->captureStart('latest', array('title' => 'Latest',
> 'class' => 'late-tab')) ?>

But this one is not; don't echo the captureStart() directive. This may
very well be what's causing the issue.

> <ul
> <li>Story 1</li>
> <li>Story 2</li>
> <li>Story 3</li>
> <li>Story 4></li>
> </ul>
> <?= $this->contentPane()->captureEnd('latest') ?>
>
> *** similar code from _most.phtml ***
>
> <?= $this->contentPane()->captureStart('mostv', array('title' => 'Most
> viewed', 'class' => 'mostv-tab')) ?>

Same comment here about not echoing the captureStart() directive.

> <ul
> <li>Story 1</li>
> <li>Story 2</li>
> <li>Story 3</li>
> <li>Story 4></li>
> </ul>
> <?= $this->contentPane()->captureEnd('mostv') ?>

--
Matthew Weier O'Phinney
Software Architect | matthew@zend.com
Zend Framework | http://framework.zend.com/

没有评论:

发表评论