Workplace Integration

Objectives: This document aims to explain how XtendedSearch works in Workplace (which comes standard), then how to implement specific searches.

Prerequisites: know how the XtendedSearch standard works as well as the XML configuration structure.

Note: the xml structure offers the same “template” tag with 2 different uses:

  • Search criteria display model (under the “search” tag)
  • Search results display template (under the “view” tag)

These two tags used by Workplace, they define the rendered display of searches in Workplace.

It is also in these templates that the “skin” of Workplace searches is defined (ie the HTML part).

We must therefore differentiate between the “workplace” skin (managed by the workplace.css file), and the “search workplace” skin (managed by the HTML part of the search XML file).

Standard features

List of searchs delivered with Workplace

Workplace comes by default with different searchs described in different XtendedSearch xml files (1 index per file, 1 to 2 search (s) per file).

These files are contained in the moovapps-workplace-impl.zip app.

Some Searchs can be used automatically, others are for unknown use:

  • workplace-customers.xml: Research on “customer” type organizations
  • workplace-documents.xml: Search on documents in FileCenters documentary spaces
  • workplace-faq.xml: Search on FAQs (data universe)
  • workplace-news.xml: News research (process documents)
  • workplace-users.xml: Search on directory users, filtered on the “Internal” organization
  • workplace-processes.xml: Not exploited by default, searches all process documents on the server, EXCEPT news
  • workplace-customers-page.xml
  • workplace-hub-address.xml
  • workplace-hub-external-contacts.xml

All these searchs share common options allowing their use in Workplace:

  • Full text search enabled
  • Similar “Template” tag (orange part starting with <! [CDATA [ in the xml)
  • $Hyperlink variable allowing access to the resource
  • Auto-executed search.

All the indexing classes of the standard Workplace searchs have been developed specifically (they are different from the historical indexing classes).

These additional classes allow (among other things) to manage the hyperlink differently, and to be able to display images stored in attachment fields in search results (image display is unfortunately not standard in historical classes ).

For example :

  • the “customer” search allows you to access the 360 customer page
  • the search “news” displays the image of the VignetteRedimensionnee control

“Workplace” Skin

Unlike “standard” searchs, all Workplace searchs are built on a common skin thanks to the “template” tags in the xml.

This structures the search pages in the same way:

  • The search criteria in a vertical banner on the left
    • a systematic full text search as the first criterion
    • the various criteria specific to each search, defined in the “customtag” tags and as variables in the “template” of the “search”
    • Action buttons
    • Example for FAQs:

xtended workplace integration 1 xtended workplace integration 1

  • The search results on the right side:
    • The rendering is different for each search, and adapted to each element displayed
    • The displayed elements are defined in the “column” tags and as a variable in the “template” of the “view”
    • a $HYPERLINK variable allowing access to the resource by clicking on it, as well as a $PHOTO variable for certain searchs allowing to display an image (avatar, image, …). These variables are defined in each of the indexing classes (see “Tips and tricks part”)
    • Example for news:

xtended workplace integration 2 xtended workplace integration 2

GlobalSearch

Workplace comes with a global search page (ESZ system name: global-search), with a transversal search system.

This page is linked to the home page, and allows you to display multi-search results from a criterion passed from the homepage.

The ESZ component used is Workplace> Global Search (without any options).

This page shows an additional block under the full text search allowing to switch from one search to another by radio button (the caption is followed by the number of results found for each search).

The search criteria (passed from the homepage) is stored in the $globalSearch variable (defined in the xml “template”), and feeds the “Full text search” area of each of the searchs.

Note

This page therefore only works correctly if $globalSearch$ is defined in the “template” of the searchs selected for the global search.

Example :

xtended workplace integration 3 xtended workplace integration 3

The “scope” of the global search (ie what are the associated searchs) is defined in the “Personalization” of the Workplace middle office (Configuration Tile), via a simple selector.

Note

The search selector displays here (a priori) only the searches with “template” in the xml (at the level of the search criteria).

  • It is therefore possible to display results without any skin, the display is similar to views (see the standard search “workplace-processes”)
  • It is therefore not possible to display the search criteria in any other way (to be tested: implement a different skin?).

QuickSearch

Workplace includes a shortcut bar (ESZ system name: shortcut-bar) accessible on the left on all pages, which allows you to display QuickSearch in particular.

These “Quick searches” allow a search on a single criterion (generally full text) and to have the result directly while staying on the current page. There is therefore no use of the templates.

The ESZ component used is Workplace> Quick Find, with in particular the options:

  • Icon (to get a preview of the icon, search the Workplace tiles, it’s the same library)
  • What research to perform
  • On which field is the research based
  • “Template” to use (that of the “view”)
  • Adding a “See more” link to a dedicated page
Note

The display templates used are the same as those of the global-search.

Example :

xtended workplace integration 4 xtended workplace integration 4

Workplace also embeds unit search pages, which are accessible from the “See more” link of the quicksearchs.

Only the “Collaborators”, “News” and “FAQs” searchs have their unit searches as standard. It is quite easy to complete these “See more” by creating custom pages (see “Tips and tricks”).

We could in the same way put tiles pointing on these unit search pages.

The ESZ component used is Workplace: Auto search executed (option: choose the search).

Note

Unit searches must be described in dedicated “search” in the xml, because the $globalSearch$ variable does not work in this case. One must use $field:content$

Example for the news :

xtended workplace integration 5 xtended workplace integration 5

Specific Searchs - Tips and Tricks

Specific searchs have been set up:

  • Membership directory with a custom 360 page
  • Publication of field reports
  • Publication of quality documents

Custom page: Search without skin / Search “Workplace-like”

It is possible to create custom ESZ pages with the historical component: Xtended Search Tool: “Xtended Search” search screen

The rendering is the same as on the historical portal, but with the “classic” Workplace skin (ie without the HTML part of the XML):

xtended workplace integration 6 xtended workplace integration 6

Side effects:

  • Texts are shifted in relation to the boxes => corrected from Workplace 5.0.13
  • The tile concept forces to have one search per tile, while in the portal you could display several searches in the same tab.
  • Text fields are too short => fixed in Workplace 5.0.13.

For new projects, it is better to use the Workplace search skin by using the ESZ Workplace component “Auto-executed search” (needs to have “template” in the xml).

In this case :

  • Some development may be required (hyperlink, image in particular)
  • Some css knowledge is required (largely inspired by standard searches)
  • We are not safe from encountering unwanted product behavior…

In theory, it would be possible to use another template than the Workplace one.

These custom pages are then accessible via a tile, or from the “See more” of a QuickSearch.

$globalSearch$/ $field:content$ variables

Globalsearch and quicksearch base their “full text” searches on the $globalSearch$ variable.

Unit search pages base their full text searches on the $field:content$ variable

It is necessary to duplicate all the searchs in the xml if one wishes to use the “See more” of the quicksearch. And therefore x2 in terms of modification / maintenance of searchs.

The ${HYPERLINK} variable provides access to the displayed resource. It depends on the indexed resource and is calculated in the indexing class. The use of standard indexing classes must allow a functional and logical hyperlink (eg: if I index process documents, the hyperlink takes me to the concerned document).

However, you may need a “360 client like” page, in which case you will have to develop a suitable hyperlink, as well as a class managing the valuation of bookmarks in the 360 custom page.

The image display (which is not standard), is nevertheless possible via development.

In the same way, the modification in css of the rendering of a search is possible, by declaring specific classes in connection with a custom css file.

ResultGroup

See the associated documentation.

The functionality of “ResultGroup” brings an immediate gain in terms of user experience (space saving of a search criterion, intuitive use, etc.)

It allows grouping according to a criterion at the top of the search results (operation similar to grouping in views):

xtended workplace integration 7 xtended workplace integration 7

This functionality is not exploited (and is hardly used) through quicksearchs.

Note

If you connect a quicksearch to a search or a grouping is declared, the search will not succeed. This again requires duplicating the searchs of the xml.

Multiple selector

For the implementation of advanced Searchs, we sometimes need multiple selectors.

Several are available to us on XML documentation of Xtended Search :

  • List
  • Checkboxes
  • AutocompleteListField (via the customcontrol attribute)

Source : https://wiki.myvdoc.net/xwiki/bin/view/Dev+Floor/XtendedSearchIntegreesDansWorkplace