New Addon - Helpers

Hi, Cockpit community!

This addon (still work in progress) combines few things that I think would improve Cockpit usage and maybe some of the ideas (e.g. json preview) can be ported to the core.

2 Likes

the json preview (and raw edit) is already on my todolist. but keep it coming maybe some ideas will make it to the core :wink:

1 Like

In the meantime added some new features, the one that think could be interesting to explore is an add-on installer, resuming, for the project I’m working it makes sense to store data structures like singletons, forms, collections in add-ons (so its possible to spin a new instance of cockpit with all dependencies and not have to share the storage folder).

https://github.com/pauloamgomes/CockpitCMS-Helpers#addon-install-cli-command

Updated the JSON feature to support the raw edit.

1 Like

Hello,
it’s Possible to Only Active the View of Json. Not the Edit?

Good point @fschuermeyer, updated the code to support it via ACL:

helpers:
  jsonview: true
  jsonedit: false
1 Like

Thanks for your nice work <3 i love a lot of your Addons :slight_smile:

Updated addon with a mechanism to override content preview URL using the config.yaml. Since the content preview is tied with the collection definition is not possible for example to have a preview url for local environment and other for dev/stage/production, etc… Addon overrides that.

(https://github.com/pauloamgomes/CockpitCMS-Helpers#content-preview-url-override)

1 Like

A new update that provides the possibility to use the global cockpit search to search in collection entries (tested with mongodb storage).

(https://github.com/pauloamgomes/CockpitCMS-Helpers#cockpit-search-on-collections)

2 Likes

Thanks for the addon. I totally need some of the tools for example to ignore duplicate entries. However, I am struggling to make it work. I’ve put the config.yaml inside the addons/Helpers/ folder, but it doesn’t seem to work (eq. i can still create duplicates in the collection tutorials and I don’t see the action bar in the navigation)

Here’s my config.yaml file:

helpers:
  uniqueFields:
    tutorials:
      - id

  quickactions:
    - group: Create
      actions:
        - label: Tutorial
          path: /collections/entry/tutorials

Would it be possible to have a Helper, in each entry of a collection, which would be intended to give direct access (a link) to the API of this collection ? The same for singletons ?

Example, collection Post :

  • Link to all entries: /api/collections/entries/post?token=XXX
  • Link to the entry being edited: /api/collections/entry/post?token=XXX&filter[_id]=XXX

Personally, I think it’s a shame that it’s not possible to have links like this. It would be really useful and much more practical.

This information could be displayed in the sidebar of the entry of a collection / singleton.

What do you think about this ?