Tabs system: Difference between revisions

Jump to navigation Jump to search
Line 8: Line 8:


= To add your own '''tab''' =
= To add your own '''tab''' =
First, you must identify the type of object your tab is about, and its objecttype code. This is full list:
1) First, you must identify the type of object your tab is about, and its objecttype code. This is full list:
* 'thirdparty'      to add a tab in third party view
* 'thirdparty'      to add a tab in third party view
* 'intervention'    to add a tab in intervention view
* 'intervention'    to add a tab in intervention view
Line 25: Line 25:
* 'categories_x'    to add a tab in category view (replace 'x' by type of category (0=product, 1=supplier, 2=customer, 3=member)
* 'categories_x'    to add a tab in category view (replace 'x' by type of category (0=product, 1=supplier, 2=customer, 3=member)


Then to add your tab, create a new module descriptor file. See page [[Module development]] for this.
2) Then to add your tab, create a new module descriptor file. See page [[Module development]] for this.


Then into the descriptor file, edit the property this->tab to add your tab using following syntax:
3) Then into the descriptor file, edit the property this->tab to add your tab using following syntax:
$this->tabs = array(
$this->tabs = array(
'objecttype:+tabname:TitleOfTab:@mymodule:conditiontoshowtab:urloftab?id=__ID__'
'objecttype:+tabname:TitleOfTab:@mymodule:conditiontoshowtab:urloftab?id=__ID__'
Line 40: Line 40:
</source>
</source>


Activate module
4) Activate module


Test new tabs is visible and link open your page.
5) Test new tabs is visible and link open your page.


= To remove an existing '''tab''' =
= To remove an existing '''tab''' =

Navigation menu