Hello,

I've written few related modules, how can I put them in on folder instead of many separate? e.g. views module shows 3 options when we go to Admin but it has only one physical folder.

Regards

Comments

WorldFallz’s picture

Views doesn't list modules, so I'm not sure what you're trying to do there. But to group modules together at admin/build/modules you would add a 'package' option to the .info file of the modules specifying the same package.

I am learning’s picture

Probably I posted it in ambiguous language, by listing modules I meant:
/admin/build/modules
this lists a group called Views and I know this grouping is done by the .info file: package = "My Module".

My concern was to place physical files (folder of each related module) in one main folder.

Here I'm talking about putting all the physical files in one folder:

Earlier they were:
/sites/all/modules/my_module
/sites/all/modules//task1
/sites/all/modules/task2
/sites/all/modules/task3

What I've done and its working:
/sites/all/modules/my_module
has .info, .install, .module and .inc file

Then I copied:
/sites/all/modules/my_module/task1
/sites/all/modules/my_module/task2
/sites/all/modules/my_module/task3

and each of the taskn is a module which depends on my_module. Its working fine, all the modules are listed in:
/admin/build/modules under the group "My Module"

I hope now I could explain what I want, suggest me if the approach has any harm.

paul.linney’s picture

Hi,
You can group modules together in each of the modules respective .info files, by setting the package to be the same, see example blow:

/*
* Module 1
* file: module1.info
*/
; $Id$
name = Module 1
description = Module 1 for Module Group
package = Module Group
core = 6.x
version = "6.x-1.0"
php = 5.2

/*
* Module 2
* file: module2.info
*/
; $Id$
name = Module 2
description = Module 2 for Module Group
package = Module Group
core = 6.x
version = "6.x-1.0"
php = 5.2

Paul

Paul Linney
Owner & Web Developer

I am learning’s picture

Thanks Paul,
I've just replied in detail that what I want and what I've done to achieve this, please check the reply above your post.
Regards