Bruno17 / MIGX

MIGX for revo 2.2 and above
83 stars 78 forks source link

MIGX based manager pages in other package #296

Open hvoort opened 7 years ago

hvoort commented 7 years ago

Hi Bruno,

I'm not sure if this is the right place to ask this question. Please feel free to guide me to the right place.

We're using MIGX for one project to simply create extensive manager pages with the main purpose of offering CRUD functionality.

I'm wondering whether I can use MIGX when creating a third party plugin package.

So historically we're developing snippets/chunks/processors etc in one system, which also uses MIGX based manager pages. Now we'd like to create a transport package of all the snippets/chunks/processors and would like to include manager pages of MIGX.

Is there a way to generate these pages, or to include the migx-config and add MIGX ad dependency, then on install we'd create the manager page?

Please let me know if I'm not clear.

Thanks Huub

Bruno17 commented 7 years ago

Hi Huub, You can export configs to your core/components - directory with the export to package - function this will create json-files there. It is also possible to import them on a target-system again, for editing them, but you can use this exported json-configs also directly without importing them. You would just need to add the packagename to the configsname like so: &configs=config1:packagename,config2:packagename for the manager-menues

Usually, I'm using migxElementsManager to create my migx - transport-packages. This exports Elements of given Categories into my core/compontents/package - folders and collects all files unter core/components/package and assets/components/package into assets/mypackages/ and can create a installable transport-package of them.

This is partially based on an older Version of BobRays MyComponent - Extra, but automates a lot.

There are some migx - packages on my Repo, made this way, they all start migx.... For example migxCalendars is one of the bigger ones.

I didn't play with dependecies, yet. So, I just install MIGX at first and then my other migx-packages.

hvoort commented 7 years ago

Thanks Bruno for the thorough explanation. I'll try this out over the coming days and let you know my experience!

hvoort commented 7 years ago

I decided my way forward is to:

  1. Export migx configs to the package
  2. Add MIGX as dependency to the package
  3. Create custom controllers that extend MigxManagerController and manupulate the request params to the config you suggested (&configs=config1:packagename,config2:packagename)

I'm currently working on a PoC and it seems to be working.

I'm reluctant using the migxElementsManager because I've quite some custom objects in my package and am afraid this will do half. However, I'll try this soon as well though, because it sounds very promising.

hugopeek commented 5 years ago

&configs=config1:packagename,config2:packagename

This is pure gold Bruno, thanks. Also works for TV configs and it seems to be fine if I create a symlink in the core/components folder to an external package location.