Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

The Link UDR is used to create a link. A link can be used to either navigate to another page or open a dialog. To create a normal link of a text, set the text field. To add a link to an icon, add the IconUDR to the components field.

To get a working link, the URL field or dialog field must be set.

You can use the following APL code to create a link that uses the 'url' field:

Link page2 = udrCreate(Link);
page2.text = "Go to next page";
page2.url = "/page2";

You can use the following APL code to create a link that uses the 'dialog' field:

// Create the dialog that will open when clicking the link
PlainText bodyText = udrCreate(PlainText);
bodyText.value = "Dialog Body";
Dialog linkDialog = udrCreate(Dialog);
linkDialog.dialogBody = bodyText;
// Create a link that opens the dialog created above
Link openDialog = udrCreate(Link);
openDialog.text = "Open dialog";
openDialog.dialog = linkDialog;

The following fields are included in the Link UDR:

Field

Description

attributes (map<string,string>)

This field may contain extra attributes to be added.

components (list<ComponentUDR>)

This field may contain a list of child components. This can be used if for example a icon should act as a link.

cssClasses (list<string>)

This field may contain a list of extra values added to class attribute. This is typically used to style the component. Please read more on Bootstrap.

dialog (Dialog UDR)

This field may contain a Dialog UDR if the link should open a dialog. If the Dialog UDR have the field addAutomatic it will also be added to the page.

id (string)

This field may contain the id of the component

url (string)

This field may contain the url to the linked page.

text (string)

This field may contain a link text, then a text component will be added as a child component. It can also be done manually by adding a component in the components list.

  • No labels

0 Comments

You are not logged in. Any changes you make will be marked as anonymous. You may want to Log In if you already have an account.