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

Not finds a file with two and more extensions #14

Open
YouROK opened this issue Mar 26, 2014 · 5 comments
Open

Not finds a file with two and more extensions #14

YouROK opened this issue Mar 26, 2014 · 5 comments

Comments

@YouROK
Copy link

YouROK commented Mar 26, 2014

I use:
render.Renderer(render.Options{Directory: "views", Layout: "layout", Extensions: []string{".go.html",".html"}})

files in dir views:
layout.go.html
hello.go.html

http output:
html/template: "layout" is undefined
if I rename files and remove .go then all ok

@hsdk123
Copy link

hsdk123 commented May 10, 2014

I'm having the same issue, for example using []string{".tmpl", ".html} - which is what's outlined in the repo example.

If I didn't find this issue thread, I wouldn't have even known that this was the reason my .html templates weren't rendering.

@yosssi
Copy link
Member

yosssi commented May 10, 2014

@YouROK Hi, I fixed the render and sent a PR to the martini-contrib team on the issue #26. If this PR would be merged, your problem would be solved.

@hsdk123 Hi, your problem looks different from @YouROK's one. What does your code look like? I may specify the reason of your problem if I can see the code.

Thanks.

@yosssi
Copy link
Member

yosssi commented May 10, 2014

@YouROK The PR #26 was merged and I think your problem is solved. Please check your problem again.

@hsdk123
Copy link

hsdk123 commented May 17, 2014

@yosssi Thanks for the help offer - while I was trying to create a minimal code sample, I realised that for some reason templates started to work again with []string{".tmpl", ".html} without problem.

I don't know what's happened, but I'll open an issue in a separate thread if I bump into the problem again. Thanks!

@yosssi
Copy link
Member

yosssi commented May 17, 2014

@hsdk123 Thanks for your reply. If you will face a problem, please open an issue. Thanks.

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

3 participants