Skip to content

Web Links

redrinkwater edited this page Jun 17, 2021 · 7 revisions

This will be about how to make the different kinds of Web Links.


Global Web Link

To set up a Global Web Link there are 3 parts:

  1. In the Schema Configuration in Specify, select the field you want to add the Weblink to. In the field format select weblink and then click on the elipses (...)

Click on the green + to add a new Weblink.

Enter a name - this is what you refer to in the XML form (step 3) Add a base URL - For example to link to the stable URI for a herbarium specimen enter https://data.rbge.org.uk/herb/. This will append the barcode of a preparation to the URL

https://user-images.githubusercontent.com/8155743/122388579-e83fab80-cf67-11eb-99e2-1c5839fb08fc.png

Click OK

  1. In the Schema Editor select None in the field formatter. DO NOT select the Web Link that was just created

  1. In the form XML:
<row>
     <cell type="label" labelfor="t2"/>
     <cell type="field" id="t2" name="text2" uitype="text" colspan="10"/>
     <cell type="field" id="WebLink" name="this" uitype="plugin" initialize="name=WebLinkButton;weblink=Repo"/>
</row>

The third line needs to be added to create the button to a weblink. The weblink=Repo needs to be edited to include the name of the weblink created within the Schema Configuration in Specify, where 'Repo' is the name of the weblink.

This line does not have to be after the field it relates to, it can be in a seperate/different row.

URL Field

To set up a URL Field there are 3 parts:

  1. In the Schema Configuration in Specify, select the field you want to add the Weblink to. In the field format select weblink and then click on the elipses (...)

Click on the green + to add a new Weblink.

Enter a name - this is what you refer to in the XML form (step 3) Add a base URL - in this example the user will be pasting a full URL into the field, so enter the field name (as it is in the left hand side of the Schema Configuration) in <> e.g.

Click OK

  1. In the Schema Editor select None in the field formatter. DO NOT select the Web Link that was just created

  1. In the form XML:
<row>
     <cell type="label" labelfor="t2"/>
     <cell type="field" id="t2" name="text2" uitype="text" colspan="10"/>
     <cell type="field" id="WebLink" name="this" uitype="plugin" initialize="name=WebLinkButton;weblink=Repo"/>
</row>

The third line needs to be added to create the button to a weblink. The weblink=Repo needs to be edited to include the name of the weblink created within the Schema Configuration in Specify, where 'Repo' is the name of the weblink.

Once this has been done, make sure that the form XML has been imported and there will now be a Web Link

Any URL added in to the text2 field will be opened when clicking on the Web Link button to the right of the field

Clone this wiki locally