Zum Hauptinhalt springen

Recipe: Add a link

in Widgets
Autorenliste
veröffentlicht: 11. Nov. 2021|Letzte Aktualisierung: 12. Nov. 2021

In this recipe we’re going to create a very simple widget that shows a link in the ticket sidebar. This is meant as a demonstration of “static” content and possibly the most basic form of app or widget.

Firstly, create a new widget and under the “Description” tab, give the widget a title and description.

We don’t to define any settings, special permissions or proxy parameters. The only think we need to check is the "Ticket" target under the "Settings" tab.

Under the “Code” tab, in the “body” section add the following code:

<div class="container"> <a href="https://example.com/" target="_blank">Example Link</a> </div>
copy

We wrap widget content in a "container" div as this provides some padding around the widget body. Within the container, we add our link markup and in this case it is an anchor tag with an href of the link URL and a target attribute instructing the browser to open the link in a new tab/window.

image.png

Ok, let's take a look at the widget in the Deskpro agent interface. Select any ticket and click on our newly created widget in the ticket sidebar and you should see the following:

image.png

That's all there is to it, we've successfully created a widget that presents a link to the user alongside any ticket.

HilfreichNicht hilfreich
nächste SeiteRecipe: Add a link with some ticket data
vorherige SeiteUsing a Proxy

Bitte loggen Sie sich ein oder melden Sie sich an, um einen Kommentar zu hinterlassen.