Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enhancing multi template and rendering #58

Open
madhums opened this issue Aug 8, 2015 · 1 comment
Open

enhancing multi template and rendering #58

madhums opened this issue Aug 8, 2015 · 1 comment

Comments

@madhums
Copy link

madhums commented Aug 8, 2015

Hi, first of all thanks for the awesome library. One of the things most people struggle when starting with gin (directly hopping from communities like rails, express, django) is templates and rendering.

From usability p.o.v, one of the things that struck me while using gin/multitemplate was, the following needs to be changed every time you add a new template or delete one of them. Which is not too handy and becomes repetitive to do in each handler when you are building a large application.

r.AddFromFiles("article", "base.html", "article.html")
r.AddFromFiles("login", "base.html", "login.html")
// ...

So based on multi template and the article I put some effort in enhancing the abilities. I would like to ask your opinion on it and decide if it can be used in multi template or make another package multitemplate-extras or drop it.

Here's the gist https://gist.github.com/madhums/4340cbeb36871e227905 (It contains a readme and a .go file. It also contains link to a full demo, new comers may find it useful)

@manucorporat your feedback is highly appreciated. Thanks!

@rtorino
Copy link

rtorino commented Apr 18, 2016

@madhums are you still working on this? I find it helpful and I wanted to add includes directory for re-usable layout components.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants