guncebektas / meteor-friendly-slugs

Meteor package to generate URL friendly slugs from a field with auto-incrementation to ensure unique URLs.
65 stars 15 forks source link

Support Nested Documents #12

Open Gaelan opened 9 years ago

Gaelan commented 9 years ago

Imagine a companies collection with entries something like this:

{
  "departments": [
    {
      "name": "Research & Development",
      "slug": "<SLUG HERE>",
      ...
    }
    ...
  ]
  ...
}

This would probably require a significant refactoring, but it would be great to be able to generate slugs for the "departments" in this example. Support for multiple layers of nesting would also be great.

heliostatic commented 9 years ago

Adding to this, for the Meteor.users collection, I'd like to use the profile.name field -- it doesn't seem possible today?

WayneUong commented 8 years ago

I would like this as well +1

todda00 commented 8 years ago

@heliostatic I have added the ability to generate a slug from a nested field in 0.4.0.

What @Gaelan is proposing is indeed quite a significant refactoring. I don't have the time to undertake this request, but would review a PR if submitted.