Documentation

Components

Overview

Super groups now have the ability to have their own components. They are setup the exact same as a regular component except for their file location. For more information regarding developing components see: https://hubzero.org/documentation/1.3.0/webdevs/components

Components Directory

/{web_root}/site/groups/{group_id}/components/com_{component}/

Component Language Files

/{web_root}/site/groups/{group_id}/language/en-GB/en-GB.com_{component}.ini

Component Paths

As a helper for super group component developers the path to the component directory is defined in a constant.

JPATH_GROUPCOMPONENT

So as an example, if your creating the component "com_drwho", the JPATH_GROUPCOMPONENT constant equals:

/{web_root}/site/groups/{group_id}/components/com_drwho/

Note: You should be able to move the component to the main components folder and and have it work without any changes.

URL's built within a super group component will automatically have "/groups/{group_cn}/" prepended to them. Please dont manually do that in your component or it will result in an error.

Creating a Component

Creating components can always be done manually by creating the files in the correct location as described above. You can also utilize the Hubzero command line application. From the command line run the following command (in the web root):

/{web_root}/cli/muse.php group scaffolding component --group={group_cn} -n=com_{component}

Simply replate {group_cn} with your groups cname and {component} with the component. The component files will be automatically placed into the correct location, ready for you to modify and commit when ready.

Last modified:

  • Copyright © 2022 Hubzero
  • Powered by Hubzero®