Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #1841 (closed enhancement: fixed)

Opened 11 years ago

Last modified 11 years ago

There needs to be a way to extend the template namespace easily.

Reported by: amcgregor Owned by: mramm
Priority: high Milestone:
Component: TurboGears Version: trunk
Severity: normal Keywords:

Description (last modified by mramm) (diff)

In _render_response the namespace is hard-coded to include tmpl_context and the controller results. This should be made easily extendable using hooks.

Additionally, hooks should be able to be made template-langauge specific. I.e. always add 'helpers' to 'genshi' templates only.

(new ticket generated for this temporary hack.)

Change History

comment:1 Changed 11 years ago by mramm

  • Priority changed from normal to high
  • Status changed from new to assigned
  • Owner changed from anonymous to mramm

comment:2 Changed 11 years ago by mramm

  • Status changed from assigned to closed
  • Resolution set to fixed
  • Description modified (diff)
  • Milestone changed from 2.0-preview-1 to 2.0-preview-2

This is done for the new renderers (just define super-simple render function which adds some fields into the dictionary before it goes in.

But that's not landing until alpha 2, so I'll commit a little hack that allows this for now. (This hack will likely not be rendering engine specific...)

comment:3 Changed 11 years ago by anonymous

  • Milestone 2.0-preview-2 deleted

Milestone 2.0-preview-2 deleted

Note: See TracTickets for help on using tickets.