Форумы / Cotonti / Support / Can I use structure for a plugin?

Trustmaster
#35356 05.09.2012 09:03

Structure is where we can draw the line between modules and plugins: modules can define their own structure, plugins use the structure of existing modules. Technically this limitation is not so strict and you might be able to do that in a plugin, but still it is recommended to make a module instead.

As an example, see how Forums module tells the system that it wants its own structure: forums.structure.php. That file registers it in Administration / Structure section. To use structure of your module in the module's code, just use the global:

$structure['module_code']['category_code']

 

May the Source be with you!