martini-contrib / render

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

current template ? #19

Closed vieux closed 10 years ago

vieux commented 10 years ago

Hi,

When using and a layout+yield, is there a way to know which layout will be (or was) yield ?

I'm thinking about a classic layout with bootstrap navbar. It could be nice to know which template is yield to be able to activate the right button.

Would you be interested by a PR ?

vieux commented 10 years ago

ping @codegangsta @cojac

codegangsta commented 10 years ago

We might be able to provide another function that gives us the current template being rendered. I can see how that can be useful

On Fri, Apr 11, 2014 at 11:12 AM, Victor Vieux notifications@github.comwrote:

ping @codegangsta https://github.com/codegangsta @cojachttps://github.com/cojac

Reply to this email directly or view it on GitHubhttps://github.com/martini-contrib/render/issues/19#issuecomment-40236702 .

vieux commented 10 years ago

@codegangsta I just submitted a PR: #20

codegangsta commented 10 years ago

Awesome! Thanks

On Fri, Apr 11, 2014 at 11:33 AM, Victor Vieux notifications@github.comwrote:

@codegangsta https://github.com/codegangsta I just submitted a PR: #20https://github.com/martini-contrib/render/pull/20

Reply to this email directly or view it on GitHubhttps://github.com/martini-contrib/render/issues/19#issuecomment-40238816 .