The code for my previous post registered this controller named Contentstack and I would not want anyone to think that it came from Contentstack. It is super hacky, just for evaluating things and common convenience features in development (for security, it should NOT be enabled except in development). It uses query string parameters but at least is supports bookmarks and refresh. It would be nice to turn some of the output into links. Of course similar features are possible for any CMS.
The controller actions are as follows:
- ContentTypes(): List content types.
- Reset(): Reset (clear and optionally reload) the repository (in memory, in this case).
- Refresh(): Check if the repository should be reset.
- Stack(): CMS connection details.
- ContentType(): Content Type definition as JSON.
- Query(): GraphQL query.
- Entries(): Entries per Content Type.
- Entry(): Invoke view for Entry or return its JSON.
One thought on “Contentstack Developer Convenience Controller”