On Wed, Jun 17, 2009 at 11:37 PM, <practicalp...@gmail.com> wrote: > Here, aren't shopcart.nitems and shopcart.contents method calling of > an object like?
Yes. If you don't like passing objects, you could just pass the list of items as an array of hashes. One nice thing about TT here is that the syntax is the same. > So I was thinking designers will be confused on them. Whether you pass data or objects, you'll have to tell your designers what they have to work with. This usually means writing some simple documentation telling them what's available on the page. I used to never pass objects, thinking it would lead to poor coding practices in the templates. Sometimes it does, but it's very convenient. My experience has been that anyone who can write HTML has no trouble with the concept of a shopping cart object that has a list of properties they can access. - Perrin