Meteor: Allow blade views to be included anywhere inside a meteor project #160

merged 3 commits into from Apr 8, 2013


None yet
2 participants

sbking commented Apr 3, 2013

I've slightly modified the meteor code to no longer require templates to be located in views/ or client/views/. I did this because I don't like organizing my Meteor project files by filetype. I prefer to place my files into folders for each site feature (each with one .coffee / .js, one .blade / .html, and one .styl / .css file, plus folders for sub-features if necessary).

Note: I was originally putting my body.blade file in client/base/. However, reactive binding in templates was not working until I moved it directly inside either client/, views/, client/views/, or the project's base directory. Not really sure how that works, but it seems to be working for my purposes.

Edit: I put the original code back in for templates in views/ or client/views/ for any projects that may be dependent on the funky namespacing system used for subdirectories of those folders. Any views placed outside of these folders are not namespaced and can be accessed directly as properties of Template.


bminer commented Apr 4, 2013

I think that I like this idea. Handlebars just puts every template in the same namespace, correct? In other words, the location of the HTML files doesn't effect the name of the Template, right?

sbking commented Apr 5, 2013

Yes, I believe namespaced handlebars templates is one of the milestones (see this discussion), but right now all templates just become properties of Template with the template's name regardless of location (excluding server/ I guess). I don't think there's any agreed upon system for view namespacing yet.

bminer merged commit 2fdf96b into bminer:master Apr 8, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment