Closed holgate closed 7 years ago
I'm trying to learn Meteor using Todos as an example.
But I'm stuck trying to display the List's slug in the url. I've already set up a 'slug' key in the list documents.
But I want the list's url to be more human-friendly e.g. http://localhost:3000/Shopping, instead of http://localhost:3000/lists/QeHMZa2z6EttCbnfH
http://localhost:3000/Shopping
http://localhost:3000/lists/QeHMZa2z6EttCbnfH
How do I change the url to the slug? I've already tried modifying routes.js from
FlowRouter.route('/:_id', { to FlowRouter.route('/:slug', { but it doesn't look like the slug is coming through?
FlowRouter.route('/:_id', {
FlowRouter.route('/:slug', {
My guess is the publication is filtering out my slug string, but I can't figure out where to make the changes - any ideas?
I'm trying to learn Meteor using Todos as an example.
But I'm stuck trying to display the List's slug in the url. I've already set up a 'slug' key in the list documents.
But I want the list's url to be more human-friendly e.g.
http://localhost:3000/Shopping
, instead ofhttp://localhost:3000/lists/QeHMZa2z6EttCbnfH
How do I change the url to the slug? I've already tried modifying routes.js from
FlowRouter.route('/:_id', {
toFlowRouter.route('/:slug', {
but it doesn't look like the slug is coming through?My guess is the publication is filtering out my slug string, but I can't figure out where to make the changes - any ideas?