# How to Configure the Deep Link Functionality

The deep link functionality lets you create links to a specific search result in your 4ALLPORTAL. This functionality needs to be configured for each module separately. A search via URL parameters can autofill the search renderer fields which display when opening a module.

A link may look like this: https://my.4allportal.cloud/?module=file&view=main&propertyKey=friendlyname&searchValue=landscape

To enable the deep link functionality, you need two steps:

  1. Change the main layout of the required module (only main view supported)
  2. Define the search via URL parameters

As soon as such a link is clicked from outside the 4ALLPORTAL, a user gets to the defined module with the defined search parameters.

# Step 1: Layout Configuration

After app installation, define the module you want to deep link to and make the following change for its main layout (the position inside the change file does not matter):

  <change xpath="//actors" type="add">
	<actor type="UrlSearchActor">
      <parameter>
        <entry class="string" key="searchPanel">moduleSearch</entry>
        <entry class="string" key="urlType">2.x</entry>
      </parameter>
    </actor>
  </change>

For example, if you want to link to a search result in module Files, you need to make a change for the main layout of module Files (default.4aplayout_c).

Store the change in your custom folder.

Learn more about making layout changes and multiple changes here (opens new window). Note that the way of adding changes is different in Core Engine versions 3 and 4.

To create the deep link, you need to build the URL by specifying the correct module, view, and search instructions via URL parameter.

  1. Go to the main view of the module you want to deep link to. The URL shows the required module and view. For example:

    • Files: https://my.4allportal.cloud/?module=file&view=main
    • Collections: https://my.4allportal.cloud/?module=f_collection&view=main
  2. Consider the search fields you want to autofill, for example "Filename" and "File type".
    Please note: Only the by default visible search renderer can be considered.

  3. Determine the corresponding technical names of these fields. You can find them in the respective search renderer, tag search_field. For example "friendlyname" and "mimetype".

  4. Consider the search values and their possible technical names, e.g. in a value option. Filetype "Jpeg" is technically image/jpeg.

You can now complement the URL with search parameter propertyKey and search value parameter searchValue.

  1. For the search field, add parameter & to the URL, followed by parameter propertyKey, an = and your search field name. For example:

    • Files: https://my.4allportal.cloud/?module=file&view=main&propertyKey=friendlyname
  2. For the search value, add parameter & to the URL, followed by parameter searchValue, an = and your search value. For example:

    • Files: https://my.4allportal.cloud/?module=file&view=main&propertyKey=friendlyname&searchValue=landscape

This URL can now be used as a deep link. It will lead users to module Files where search field "Filename" autofills with "landscape".

You can also combine multiple search fields.

# ASCII URL Encoding

The URL requires a specific encoding and does not support characters like / or ,.

It is thus necessary to convert not supported characters in your URL to ASCII characters. E.g., a / needs to be replaced with %2F, a , needs to be replaced with %2C.
An encoding reference with a converter can be found here, for example: W3Schools (opens new window).

# Combine Fields

If you want to combine two or more search fields, you need to follow this scheme in the URL:

searchfield 1 , searchfield 2 & searchvalue 1 , searchvalue 2

Remember to replace , with %2C:

  • Files: https://my.4allportal.cloud/?module=file&view=main&propertyKey=friendlyname%2Cmimetype&searchValue=landscape%2Cimage%2Fjpeg

This URL will lead users to module Files where search field "Filename" autofills with "landscape", and search field "File type" autofills with "jpeg".

# Requirements and Limitations

# moduleSearch

This change only works if the search component id of your main layout is moduleSearch (it is in the default). If your module's layout is customized with another search component id, this custom id needs to be defined in the change instead of moduleSearch.

# Search Renderer Limits

  • Available Fields: You can only trigger a search via URL parameters if that search could also be performed manually in the current module. For example, you cannot trigger a search result for field "friendlyname", if field "friendlyname" is not part of the search renderer. Make sure all required search fields are configured.
  • Visible Renderer: The automatic filling is only possible for the search renderer which is displayed by default when opening the module. Renderers that need to be selected via a dropdown cannot be considered.
  • Comparators: The definition of comparators is not supported. The comparison, concatenation, and group operators need be configured in the respective search renderer.

Learn more about search renderer configuration here (opens new window).

# Multiple Modules

If required for more than one module, make sure to add the layout change to each module's main layout separately, e.g. for module Collections:

Request missing documentation