martini-contrib / render

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

Is it possible to have multiple layouts? #38

Open rexposadas opened 9 years ago

rexposadas commented 9 years ago

Is there an example I can look at to see how Renderer handles multiple layouts? Say my registration page and my login page have two different layouts. How would I handle that?

From this code:

m.Use(render.Renderer(render.Options{
    Layout:    "layout",
}))

It seems that you can only have one layout per Renderer. Would I "use" multiple Renderers?

Thanks.

mickelsonm commented 9 years ago

Hey checkout this past closed issue (might be what you need):

https://github.com/martini-contrib/render/issues/4

rexposadas commented 9 years ago

@mickelsonm Thanks for the response. It looks like this project is no longer maintained. I've since moved to a different framework. Thanks anyways.

mickelsonm commented 9 years ago

@rexposadas : No problem. I have been wondering about that too, but I still find my way back here to check things out. Out of curiosity, which framework are you going with?

rexposadas commented 9 years ago

@mickelsonm The team decided on Django - I was pushing for a Go framework since that's my main language.

mickelsonm commented 9 years ago

@rexposadas : Yeah it seems like a lot of people are jumping on the Django/Python band wagon.I have nothing bad to say about it, but I am definitely enjoying web development using Go. There might be a few nitpicks, but nothing that I can't find a solution for. Anyways, good luck!