Pixanthropy / pixanthropy-web

0 stars 0 forks source link

Enable organizations (all profiles?) to be linked through human-readable link. #47

Closed vinneyk closed 7 years ago

vinneyk commented 8 years ago

For example, https://pixanthropy.com/care (cdp | Vinney-Kelly | praise-the-sun). I think this can/should replace the existing "by id" method of linking to organization (and possibly user) details pages. If we keep the profile id fields in place (which I believe we should), we could actually enable organizations to be able to change their "slug" while maintaining the previous slug as a redirect. (I've seen this type of url routing referred to as a "slug" in blog engines. Not sure that's proper translation for this context.)

Here's the table structure I'm considering:

[Profiles] 1 <==> * [ProfileSlugs]

Where ProfileSlugs table has the following fields:

ProfileKey (PK, int)
ProfileSlug (PK, string) [Indexed]
ProfileType (int) [Indicates if the record is an Organization or a User]
RedirectToProfile (int) [FK to self on ProfileKey,ProfileSlug]
RedirectToSlug (string) [FK to self on ProfileKey,ProfileSlug]
konisland commented 7 years ago

Readable URL links has been added to the Admin panel for organizations.