I am working on a plugin for Interworx to intergrate the WHCMS billing/support system. I have having a few problems and I wish you guys had API documentation for this.
I have it listing one menu item for siteworx and nodeworx, is there a way to create subitems like other menu functions.
I have a template in my Ctrl/Siteworx/Billing.php inside the class and index view. How do I pass that variable to the templates/default.tpl its currently only showing the text on that tpl file. I need access to that variable from the controller class, I tried setting it with setvar and getvar inside template but that did not work.
I would appreciate some advice/assistance in this plugin creation, maybe some documentation that has been written up but not yet published?
I am working on a plugin for Interworx to intergrate the WHCMS billing/support system. I have having a few problems and I wish you guys had API documentation for this.[/QUOTE]
Understood Anthony, the plugin documentation is currently lacking, as you’ve discovered, the existing plugins are all there is to go on currently.
I have it listing one menu item for siteworx and nodeworx, is there a way to create subitems like other menu functions.
Yes - you could do the following for example:
/**
* Customizations to siteworx menu can be done here
*
* @param IWorxMenuManager $MenuMan
*/
public function updateSiteworxMenu( IWorxMenuManager $MenuMan ) {
$group = array( 'text' => 'Hello Group',
'class' => 'iw-i-star' );
$MenuMan->addMenuItemAfter( 'iw-menu-home', 'your-group-id', $group );
$item = array( 'text' => 'Hello Item',
'url' => '/siteworx/yourlink',
'parent' => 'your-group-id',
'class' => 'iw-i-plugin' );
$MenuMan->addMenuItemAfter( 'your-group-id', 'your-item-id', $item );
}
I have a template in my Ctrl/Siteworx/Billing.php inside the class and index view. How do I pass that variable to the templates/default.tpl its currently only showing the text on that tpl file. I need access to that variable from the controller class, I tried setting it with setvar and getvar inside template but that did not work.
You’d assign a variable to the template from inside the controller action method like this: