How do I..?

How do I make a module which creates module-wide settings?

If you need to create settings that apply to an entire module, rather than on a per-plugin basis, you should define some site settings and prefix them with your module's class name.

How do I make a module to have plugin settings?

You can create plugin settings by creating/merging fields into the plugin settings admin box for your module. You can check Example Module 3: Day of the Week for an example or see  Defining Plugin Settings for more details.

How do I make a plugin which makes an Ajax call to the server?

If you want to reload a plugin using AJAX, you can do this very easily by using either the refreshPluginSlotAnchor() function or the refreshPluginSlotJS() function to generate the html/JavaScript needed.

How do I create a new content type?

You can create a content type by creating a module and defining the content type in the module's description.yaml file.

 

How do I make my module call a method in another module?

If your module (the caller) lists the module that you are calling (the callee) as a dependency in its description.yaml file (see Reference of properties in a Module's description.yaml file) then the caller can call the callee's methods in its php code.

How do I create a new panel in organizer?

You can create an Organizer panel by writing .yaml files and placing them in the tuix/organizer/ subdirectory of your module.

How do I add a column to another module's panel in Organizer?

By writing .yaml files and placing them in the tuix/organizer/ subdirectory of your module, you can define elements and merge them into the other module's panel.

How do I create a new admin box?

You can create an admin box by writing .yaml files and placing them in the tuix/admin_boxes/ subdirectory of your module.

How do I add a field to another module's admin box?

By writing .yaml files and placing them in the tuix/admin_boxes/ subdirectory of your module, you can define elements and merge them into the other module's admin box.

How do I write JavaScript functions for my plugins?

In the js/ directory of your module, create a file called plugin.js.

How do I hide navigation or buttons from administrators without a specific admin permission, in Organizer?

In TUIX, there is one special property called priv. This removes elements for administrators who don't have the named permission; it's equivalent to doing an unset() in your PHP code.