On 17/12/05, Rubic <[EMAIL PROTECTED]> wrote:
> But what if I've got 20 or 30 different attributes
> that I want exposed in the template?  And what if I
> have several plaes where I invoke the template?
> Must I build and return a dict of values each time or
> is there a simpler way for these attributes to be
> accessed from main.kid?

pass the object with the many attributes in the dicttionary,  and
reference them in the kid template.

e.g.

  @expose(html='test.kid')
  def method(self):
     obj = get_obj_with_lots_of_attrs()
     return dict(obj=obj)

in test.kid

...
<span py:content="obj.attribute1">
<span>$obj.attribute2</span>
...

HTH


--
wavy davy

"True religion confronts earth with heaven
and brings eternity to bear on time"
 - A. W. Tozer

Reply via email to