Contentstack Developer Convenience Controller

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.

https://pastebin.com/Kps4bC3f

Published by John West

I like Twizzlers and um

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: