| 40 | === Widget-related custom modules === |
| 41 | The widget is to be a more flexible evolution of the work started in [[Sharing_Engine/Technical_Proposal Project Sharing Engine]]. The plan is to build on this base but turn the it into a clear, clean model based on a set of components that can be added, extended and re-used. Since Drupal 7 is not MVC, and neither is Drupal 8, the proposal is to use the CTools Plugin architecture ([http://ygerasimov.com/ctools-plugins-system example here]) to allow new Widget components to be added/enabled over time. |
| 42 | |
| 43 | ==== Widget components ==== |
| 44 | 1. '''Transition Widgets Core''' --- a ''module'' that holds all the shared variables, admin, functions, permissions and other logic that will drive all widgets and facilitate the rest of the components. |
| 45 | 1. '''Builder''' -- this is the UI ''module'' that will allow a user (with permission) to chose the type of widget, Context (see below) Purpose and style of a Widget and build an instance. The module will take these options and create a 'Widget Instance' (see below) before generating the themed, styled ''Widget Chrome'' (below) for a user to paste into their website. |
| 46 | 1. '''Chrome''' -- the 'Widget Chrome' is this is the actual HTML and related CSS/JS, built by the ''Widget Builder'' (above), that a user cut/pastes into their site in order to display the widget. It's held on the client site and runs via whatever tech drives it (iFrames to start, web services & backbone maybe one day). The chrome used depends the user's choice of ''Type'' (Full screen, sidebar, button options etc), ''Style'' (css, colours etc - not planned to be editable initially), and ''Framework'' (iFrame for now, later other options might become available). |
| 47 | 1. '''Settings''' -- When user builds a widget, the relevant context and purpose will be stored in a Drupal ''entity'' called ''Widget Recipe''. This then allows a user to re-generate the widget with different styles/types using this instance. |
| 48 | |
| 49 | |