-- Julian102 <[EMAIL PROTECTED]> wrote
(on Tuesday, 25 November 2008, 03:00 AM -0800):
> Background
> I have a website that sells DVD's. I have a navigation box which is on every
> single page of the site in the left column where you can browse the
> different categories of DVD. The categories in this table are stored in a
> table in the database where they are set to on or off.  I need to do some
> logic that pulls the categories that are set to "on" from the category table
> and display them on every page of the website.

First, make sure that logic is encapsulated in a model. Then create a
view helper that pulls that information from the model and renders it.

If that information is not changing often, I'd also add some caching
logic to either the model or the view helper to reduce the number of
hits to the database.


> The Proposed Fix
> I am confused as to the correct way you would fix this problem. I think you
> would need to put a link from the layout to a view helper perhaps a partial
> that would somehow get the information from the model without involving any
> specific controllers but I'm not sure.
> 
> I'm sorry as this is probably a very simple question but I introduced ZEND
> Framework at work last week and I need to get things done quickly to justify
> the move but I'm struggling to understand parts of the official
> documentation.

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

Reply via email to