On Jun 10, 2007, at 1:51 PM, Tim Hicks wrote:
This compares to what I envisage the view approach looking like::<div tal:repeat="brain weblog/getLazyEntries"> <a tal:define="weblogentryview brain/@@weblogentryview" tal:attributes="href weblogentryview/getArchiveURL" tal:content="brain/Title">title</a> </div>
except that i wouldn't do the 'brains dance' inside the template but in the view class.
i've adopted the practice of only passing out dictionaries or adapted objects into my templates.
the `getLazyEntries` method is an implementation detail that should be abstracted from the template.
without looking at the current interfaces i would postulate having a `getEntries` method for `IWeblogView` that simply returns instances that provide `IWeblogEntry` -- that's all the template needs to know.
Maybe the latter is better simply because it is less "magic" and I'm over-estimating the down-side of not using the standard API.
bingo! (IMHO)... ;-) tom
_______________________________________________ Product-Developers mailing list [email protected] http://lists.plone.org/mailman/listinfo/product-developers
