Skip to main content

Widgets

A Widget is a UI Component that performs some purpose (search, action, display etc.). In any content view, widgets make up all of the interactive elements.

Available Widgets for Simflofy TSearch


Widgets Definitions

A Widget Definition defines what the widget does, the type of widget it is and any custom fields required. When a Widget Instance is created from a Widget Definition, it then defines the values for the standard and custom fields of the Widget Definition.

A Widget Definition defines what the widget does, the type of widget it is and any custom fields required. A Widget Instance is just that, and instance of that widget, which uses the logic and default values attached to that definition.

For example: You can have two instances of the same facet search widget in a view, but the fields they search can be different.

Simflofy allows for easy development of widgets. For more information on writing your own, click here.

Widget Definition Configuration

All of the widgets will follow the same format. Here is a breakdown of what the fields mean.

  • Widget ID: The Definition ID. This is also the name of widget as it appears in javascript.
  • Widget Type: Defines the type of actions that can be performed with the widget and where they can be placed in a widget template. See the next section for what the types are and how they perform.
    • result_set: This type of widget is meant to act as a base layer to display results and house content actions
    • content_action: This widget is meant to act on a single document, but might have a bulk option
    • facet_search: This widget is likely a sidebar widget that searches on a configured field
    • top_menu: As the name suggests, these widgets appears in the menu bar. This usually represents some additional utility or bulk action
  • Description: The default description of what the widget does
  • Restrictable: Whether this widget can have permissions applied to it.
  • Action Type: This field reflects how the widget interacts with the source content
    • na: This widget does not interact with the content
    • GET: This widget will retrieve information or content from the source system using Content Services.
    • POST: This widget can create new content or create new items in the database
    • UPDATE: This widget can update existing content or items in the database
  • Template: Which templates can use this widget. Most will be simflofy. To deselect the default template hold control and select the highlighted template. This will allow this widget to be used in any template.
  • Custom Fields: A list of any custom fields, their descriptions and default values

In the Federation section of the navigation menu there is a link to the lists of available widget definition.

In the Widget Definition list you can search and sort by Widget ID, Type or description.

To make changes to a widget definition click the edit button. Make any necessary updates and click save. You will need to republish any templates that have widget instances based on the edited definition in use in order to see any changes reflected in your TSearch environment.

You cannot delete a widget definition that is being used by any widget instance. To delete a widget definition you must first remove it from any widget instances that are using it. Once this is done, click the delete button to the left of the definition and click ok to confirm you want to delete the definition. This action cannot be reversed.


Widget Instances

A Widget Instance is an instance of a Widget Definition that can now be placed in a Content View. Many instances of the same definition can exist in a content view. Each instance has a unique id. Simflofy comes preloaded with a number of common widget instances. If you don't find the type you need in your list, found under Federation > Widget Instances, you will need to create one.

In the Widget Instance list you can search and sort by name, widget ID, label and field. To the left of each widget instance there are edit and delete buttons.

To make changes to a widget instance click the edit button. Make any necessary updates and click save. You will need to republish any templates that have the widget in use in order to see any changes reflected in your TSearch environment.

You cannot delete a widget instance that is being used by any content view template. To delete a widget instance you must first remove it from any templates it's being used on. Once this is done, you can click the delete button and click ok to confirm that you want to delete the instance. This action cannot be reversed.


Create a New Widget Instance

  • In Simflofy Admin go to Federation > Widget Instances
  • Click the New Widget Instance button at the bottom.
  • Select the Widget Definition for the new Widget Instance and click the Continue button
Widget Instance View

Name: The name of the Widget Instance that will be display in Simflofy Admin when creating Simflofy Views

Field: The facet field associated with this Widget Instance. You can put na if this Widget does not require a field but there must be a value.

Label: The label that will be displayed in the Simflofy View when this Widget is displayed (only if the Widget shows a label).

Widget Instance Properties

Options is a custom field. See below

Custom Fields

Custom Fields are also defined are part of the Widget Definition and act as additional configuration for the widget. Common examples include sort order, chart size, and whether to allow the widget to perform bulk actions. In the above case, the user is defining what facts to search on, and how to label them in a dropdown. When developing a widget, all custom fields should have a default value.

Click Save to finish creating your new Widget Instance.


Types of Widgets

TSearch templates can allow only certain types of widgets for each section they declare. Following is a list of the various widget types and widgets that can be used for these types. Click on the widget link for more details on configuration, usages and examples.

Result Set

This type of widget is used to display search results. These are usually added to the body section of most templates.

Search on a particular facet or field. Most sidebar widgets are facet search widgets. Two out-of-the-box examples would be the single column list (similar to Google results) and a double column where results are displayed side by side.

Top Menu

This type of widget is a menu / toolbar item that provides some type of action. By default, if widgets have their bulk option enabled or a widget is a bulk action, it will be added to a Bulk Action menu. If there are no bulk actions, the menu will not appear.

Content Action

This type of widget leverages the Simflofy Content Services such as the content download widget and the image lightbox widgets that allows users to perform actions on selected content. These widgets are usually added to the body of a content view based on the default simflofy template.

Other Types

  • Pager: Use previous and next buttons to navigate through pages of search results
  • Records Management: Adds the ability to use the Records Management features of TSearch

Related Articles:
TSearch Basic User Guide
TSearch Records Management