Jump to content

Recommended Posts

Posted

Do you know a module that installs some new templates and fields - so I can take it as example?

It should loop trough the templates/fields it has to install and checking their existence before it installs them and it would be nice, if they are deinstalled too, if they are not used. I had once an example, but I forget where ?

Posted

You can have a look at my relatively new help videos module. Relevant code starts here.

All the basics for creating fields and templates and pages are there. Should be easy to build upon.

The uninstalling part goes in the ___uninstall() method. You basically need to keep track about what you installed (e.g. save this info to your module config data) and then remove that stuff.

  • Like 2
Posted
2 hours ago, gebeer said:

You can have a look at my relatively new help videos module. Relevant code starts here.

Thanks, that´s nice what your example does, because I was looking for an example that uses pages like your module does... in the admin, too! ? 

Posted

You can have a look at my SnipWire module (currently in development). It has an extended installer class which creates fields, templates, pages, permissions, copies files to directories, ... using an array.

Here is the installer:
https://github.com/gadgetto/SnipWire/blob/dev/installer/ExtendedInstaller.php

And here the resources array:
https://github.com/gadgetto/SnipWire/blob/dev/installer/ExtendedInstaller.resources.php

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...