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
How to access to blog_posts collection from Meteor? #261
Comments
The full |
Hi @hellogerard ! In the package documentation, there is an example to customize the blog index template.
I have customize following the previous example my index blog and it works fine. I have changed the line *In the client * layoutIndexBlog.html
layoutBlog.html
layoutPost.html
*In /lib folder *
route.js
The comented code in route.js file is the tricky part... I can get the slug paramenter with .params but I don´t know how can I keep the relationship between the post entry in the index and the post page... I don´t know how could make a .findOne query to blog_posts collection to return the right blog post page using the :slug parameter.... Thanks in advance, and congratulations for your work with this package! It is amazing! I wait your suggestion ( Save my life man!!;) |
Hi,
I would like to customize the templates for Index and for each blog post page. I have achieved the first goal (in the documentation there is a simple and great example to create a custom template for index layout). But I can't see any example to customize the blog post... How can I access from meteor to mongo collection (blog_posts collection) to get the data using the :slug ID? For example something like collection.findOne({slug:this.params.slug});) ?
Thanks in advance!
The text was updated successfully, but these errors were encountered: