Feature proposal #6592
closed
Implement capability to output a tab
Added by krileon over 7 years ago.
Updated about 7 years ago.
Description
Some integrations have the functionality to output a tab from a trigger. If CB Auto Actions can return a tab response then it'll be capable of adding new tabs to GJ for example.
A new Output tab should be added after the Action tab to control what is displayed. This should of course support tabbed output, replacing a variable of the trigger, etc..
There is no CBTabs -> Add Tab like functionality. So what's need is a Display of Return and an Output of custom PHP to construct the proper array that GJ expects. So something like the below.
return array( 'id' => 'gallery', 'title' => 'Gallery', 'content' => '[content]' );
This means the Output tab, at this time, just needs 2 or 3 parameters. 1 for customizing the return values and 1 for determining how it should be displayed (e.g. a return, echo, etc..). A 3rd likely needs to be provided to select the method of the customization (e.g. HTML, PHP, etc..).
- Status changed from Assigned to Resolved
- % Done changed from 0 to 100
Implemented as a Layout parameter under the Output tab. After selecting how the auto action should display (e.g. return, echo, var_dump, etc..) you can supply a custom layout to alter how the contents of your action should display. Full substitutions are supported (including format functions if enabled) and content plugins (if enabled). The layout can output as either HTML or PHP. If using PHP your supplied layout will be treated as PHP code. This can be used to add new tabs to GJ easily with an array return. Example as follows.
return array( 'id' => 'activity', 'title' => CBTxt::T( 'Activity' ), 'content' => $content );
- Status changed from Resolved to Closed
Also available in: Atom
PDF