Project

General

Profile

Actions

Feature proposal #6592

closed

Implement capability to output a tab

Added by krileon about 7 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
19 April 2017
Due date:
% Done:

100%

Estimated time:

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.

Actions #1

Updated by krileon almost 7 years ago

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..

Actions #2

Updated by krileon over 6 years ago

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..).

Actions #3

Updated by krileon over 6 years ago

  • 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 );
Actions #4

Updated by krileon over 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF