Menu Services

Overview

In some cases it is desirable to be able to insert a link activating a single menu item in a page. This section specifies how you can do this.

The menu item will only be shown to users having sufficient authority. This means that if you want to let your administrators have access to an update page from a page showing information about a record, you can just insert the link to the update page on the detail page (if the authorization of the update page ensures that it is only available for administrators).

This option allows you to activate a business process from another business process.

In the following section it will be assumed that the functionality is already available as an element in the site structure tree.

Usage

Define alias

Fundamentally the link will be created by using a special replacement marker in the template. This replacement marker must specify the element from the site structure tree to load. To make it possible to refer a site element without having to use a surrogate number, which will not in anyway explain what function is inserted, it is necessary to define an alias, which can be referred in the replacement marker.

The alias is created using the menu item "Site structure->Alias" in the administration menu. Press "Insert" and enter the necessary information for the alias. It is the information entered in the field "Alias", which will be written in the template, so we recommend that this text is as self explanatory as possible.

Specify alias for element in site structure tree

Select the site element, you wish to be able to activate as a link in the site structure tree and press "Menu service". Select the alias you have created in the drop down box and press "Apply".

Please note the this alias now refers the specific link between the selected site element and the parent element in the tree. If the same site element is a child in more than one place in the tree it is the information for the selected link, which is used when the alias is referenced.

Insert replacement marker in template

To reference the alias insert the following code in the template (references the alias "AliasText"):

/(MENU-AliasText)

/(WSBEGIN)
    <p><a target="/(WSMNUTAR)" href="/(WSMNUURL)">/(WSMNUTXT)</a></p>
/(WSEND)

The menu item name defined by the referenced site element will now be shown as a link to the users having the necessary authorization level.

Menu services with parameters

Menu services also support transferring of parameters to the referenced business process. For information on how to develop a business process in Plex/Websydian that can handle parameters please read Process Parameters.

The following examples shows the ways of transferring parameters via menu services.

Parameters transferred from existing detail or grid fields

/(MENU-AliasText?WSDTL1&WSDTL2&WSDTL3=/[WSDTL4])

/(WSBEGIN)
    <p><a target="/(WSMNUTAR)" href="/(WSMNUURL)">/(WSMNUTXT)</a></p>
/(WSEND)

In this scenario the implementation name and values of the detail fields WSDTL1, WSDTL2 and WSDTL3 are passed to the business process. The value of the detail field WSDTL4 is passed as the field named WSTLD3.

Parameters transferred as constants

/(MENU-AliasText?WSDTL1=help)

/(WSBEGIN)
    <p><a target="/(WSMNUTAR)" href="/(WSMNUURL)">/(WSMNUTXT)</a></p>
/(WSEND)

In this scenario the field WSDTL1 will be parsed to the business process with the value help.

Please note that the constant value may not begin with the character sequence /[ or contain an ampersand.

Replacement markers described

The following describes the available replacement markers to be used between the /(WSBEGIN) and /(WSEND) replacement markers.

Replacement marker Description
/(WSMNUTAR) Target as entered in the Websydian Express administration interface in the site structure.
/(WSMNUURL) URL generated for the menu service
/(WSMNUTXT) Menu text as entered in the Websydian Express administration interface in the site structure.