martini-contrib / render

Martini middleware/handler for easily rendering serialized JSON, XML, and HTML template responses.
MIT License
245 stars 57 forks source link

add 'current' to get the name of the current template #20

Closed vieux closed 10 years ago

vieux commented 10 years ago

I'm not good with names, please feel free to suggest a new one.

With this PR, you can know which template is being rendered.

For exemple with {{ if eq yield_name "index"}}

Close #19

vieux commented 10 years ago

@codegangsta Any comment on that PR ? I'm open to any suggestion regarding yield_name

codegangsta commented 10 years ago

What do you think of current?

{ if eq current "index"}}

codegangsta commented 10 years ago

BTW this is a great addition

vieux commented 10 years ago

@codegangsta changed to current and added a test

codegangsta commented 10 years ago

Awesome! Landing this

vieux commented 10 years ago

@codegangsta cool, see you at gophercon!