title: Zend Framework - When to use viewscripts/partials vs view helpers
body: <p>I'm creating a library of display objects for our application. They render the html of a lot of the common objects (users, conversations, messages, etc) in various views. By views I mean the object can spit back different 'zoom levels' of itself with different markup.</p>
  
  <p>Some display objects contain other display objects to render eg. a user list object renders user objects in a certain view (this particular view spits them back in list items so they fit into the list)</p>
  
  <p>I'm trying to move these into the proper way of doing things in ZF, but I can't decide if these should all be view helpers, or if they are all view scripts/partials.</p>
  
  <p>Just making them view scripts and rendering them with ->render() seems a little dirty because any information or parameters I want to pass to them has to be assigned to the view object.</p>
  
  <p>Partials seem a little more correct, except not sure if its proper to be doing display logic in these (if 'showNotificationStatus' is passed as a parameter, render this span). Or if its kosher for partials to render other partials (a user list rendering the user object).</p>
  
  <p>View helpers seem like possibly the right way to do it, but I don't know if that is overusing view helpers. Each object could be a view helper and accept a objectview parameter so it knew what zoom level/container to render itself in, or each objectview could even be its own helper (so there's no big switch statement inside an object). One nice thing about the views is you can pass parameters and it still has access to the view context if you need something from that level.</p>
  
  <p>Most of these are going to be accepting models, with a few requiring some extra parameters to know what to do (eg. showNotificationStatus from above). What's the proper tool for this?</p>