Link Behaviors
Link Behaviors define what happens on the website frontend when a hyperlink is clicked. In the Editor, a link behavior must be assigned to all links. Link behaviors determine the look and feel of hyperlinks in XperienCentral, for example whether the link appears in the same browser window or in a new window, the size of the window that is linked to, whether it has a navigation bar, is resizable, and so forth. By default there are two default link behaviors. You can also create your own link behaviors and use them for hyperlinks.
In GX WebManager 9, "link behaviors" were referred to as "link models". While the name has been changed in many parts of XperienCentral, you will still come across this old term in some interfaces, classes and stylesheets. In XperienCentral, "link behaviors" and "link models" refer to the exact same functionality.
In This Topic
Defining a New Link Behavior
To define a new Link Behavior, follow these steps:
- Select "<New Link Behavior>" from the "Select Link Behavior" drop-down list. The properties for the new behavior appear below.
Define the following properties:
Property Description Title The name of the link model. For best results, give the behavior a meaningful name that reflects how it behaves. CSS class The cascading stylesheet (CSS) to use to style the pop-up or new window for the link. Rel attribute Specifies a value that will be rendered in the rel
attribute in a link tag. This can be used to make sure search engines do not follow a certain link. Therel
attribute describes the relationship between documents. For more information and all valid link types, see https://developer.mozilla.org/en-US/docs/Web/HTML/Link_types.Target attribute Specifies a custom value for the target
attribute of the link. This can be used to determine where a link should open or if the link should target an iframe. Thetarget
attribute can contain one of 4 default values or a custom value (for example the name of an iframe). See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a for more information.Pop-up Specifies whether the link opens in a pop-up window. This means that the link will not open in the active browser window nor in a new browser. Width The width of the pop-up in pixels. Height The height of the pop-up in pixels. Left The number of pixels from the left edge of the screen where the pop-up will appear. Top The number of pixels from the top edge of the screen where the pop-up will appear.. Location Specifies whether an address bar appears in the pop-up window. Toolbar Specifies whether the toolbar is visible in the pop-up window. Folders Specifies whether a [Link] button that links to the "Favorites" menu is visible in the pop-up window.. Status bar Specifies whether the status bar is visible in the pop-up window. Scroll bars Specifies whether scroll bars are visible in the pop-up window. Resizable Specifies whether the pop-up window is resizable. Menu bar Specifies whether the menu bar is visible in the pop-up window. New window Specifies whether the link opens in a new browser window. The new browser window will have the same settings as the browser window in which the link is opened. Set popup attributes as Specifies the pop-up attributes. The options are "onClick and "data attributes". If "onClick" is selected, the pop-up options are added as an "onClick" attribute. When "data attributes" is selected, the attributes are added to the link as data attributes instead. The possible data attributes are:
Property Data Attribute
Width data-width Height data-height Left data-left Top data-top Directories data-directories Location data-location Toolbar data-toolbar Folders data-folders Status bar data-statusbar Resizable data-resizable Menu bar data-menubar
You can select multiple properties for a "Pop-up" link.- Click [Apply]. The new Link Behavior is created. When you create a hyperlink in the Editor, the behavior is available from the "Link Behavior" drop-down list.
Copying a Link Behavior
Copying a link behavior makes it possible to quickly create a new link behavior based on an existing one. To copy a link behavior, follow these steps:
- Select the link behavior that you want to copy from the drop-down list.
- Click [Copy].
- Click [OK] to confirm the copy operation. The link behavior is copied. By default the name of the new link behavior is "Copy of <name>". For example:
Deleting a Link Behavior
To delete a link behavior, follow these steps:
- Select the link behavior that you want to delete from the drop-down list.
- Click [Delete].
- Click [OK] to confirm the delete operation. The link behavior is deleted.