I have still essentially the same setup as in the tutorial: a blog
post which has a slot for comments. In the comments template, there is
a loop to iterate over all comments: so all the comments are shown
using one template. However, I would like to break this up, so that a
comment has it's own template file. This is because comments will be
shown in two ways: a standard html request of the page, where all the
comments are shown, and when adding a comment via Ajax, a single
comment will be returned to the browser.

I can simply have two different templates: the one for comments that
is currently in the tutorial, and a cut-down one for the Ajax call.
However, this seems bad form, as if I want to change the HTML of the
comment later, it has to be changed in two places. I could loop over a
manual php 'include' in the comments (plural) template to a comment
(singular) template, but I wonder if there is some 'Agavi' way of
doing it that is better...?

Michal.

_______________________________________________
users mailing list
[email protected]
http://lists.agavi.org/mailman/listinfo/users

Reply via email to