Skip to content

feat(content-types): allow custom root paths for CT managers #74

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Convly
Copy link
Member

@Convly Convly commented Apr 9, 2025

Original idea by @alexandrebodin in #24 (comment)

Custom Path Support for Content Types Manager 🎯

Introduce a new feature that allows users to customize the path for the content-type managers' instance.

It aims to provide greater flexibility in how queries are made against Strapi app, especially those having heavy customization (or simply want to use the CT managers for plugins' models)

Custom Path Configuration

  • Developers can now specify custom paths for content types managers from the client's calls
    • strapi.collection('foo', { path: '/plugin/baz/foo' });
    • strapi.single('bar', { path: '/my-custom-path' });

🧪 Testing

  • Unit tests added for new path configuration functionality
  • Manual testing performed across the different demos

📚 Documentation

Documentation has been updated to include:

  • Configuration guide for custom paths
  • Examples of common use cases
  • Updated outdated demo list to include the react-vite one

Related issue(s)/PR(s)

fix #24


Notes:

  • This change contains no breaking changes for existing applications 🎉
  • No additional symbol is being exported from the public API
  • The react-vite demo project has been updated to integrate toast notifications for easier debugging

@Convly Convly added the pr: feature New or updates to features label Apr 9, 2025
@Convly Convly added the source: client-content-types Source are the content types' managers label Apr 9, 2025
Copy link
Contributor

@innerdvations innerdvations left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code LGTM, but I haven't tested it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: feature New or updates to features source: client-content-types Source are the content types' managers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[feat]: support content-types from plugins
2 participants