Tutorials
Creating a QR Code

Creating a QR Code linked to Drupal content

This documentation was developed specifically for the QR code used on the sign for the Spider/Butterfly Pavilion guide. However, it should be applicable to any page or file created or uploaded to NHMLAC's Drupal sites.

Choose a URL to use for the QR code

This will be important further in the process. The URL should include the site's domain name and a unique path. An example of a URL for a Butterflu Pavilion guide QR code is below:

https://www.nhm.org/butterfly-pavilion-guide-english

Create a QR code with the desired URL

There are many free QR code generators available online. Adobe Express (opens in a new tab) has a fully featured QR code generator available online. Use the URL created in the previous step to generate the QR code.

Upload file to Drupal

To read about this topic in-depth, see Media/Files

To upload a new file, navigate to Content > Media > Add Media > File. Add a name and description for the file. Then, click Choose File to select the file from your computer. Finally, click Save to upload the file to the site.

Find the file's URL

Navigate to Content > Files to see a list of all files uploaded to the site. Find the file you just uploaded and click on it. This will take you to the file's page. Copy the URL from the address bar. It should look something like:

https://nhm.org/sites/default/files/2023-03/BPX_2023_Butterfly_Guide_Digital_Spanish_FINAL_1.pdf

Create a URL Redirect

To read about this topic in-depth, see URL Redirects

Navigate to Configuration > Search and metadata > URL redirects. Click Add a redirect. In the Path field, enter the QR code URL path (see below for the an example for the Butterfly Pavilion guide):

butterfly-pavilion-guide-english

In the To box enter the file's URL from the previous step (see example below).

https://nhm.org/sites/default/files/2023-03/BPX_2023_Butterfly_Guide_Digital_Spanish_FINAL_1.pdf

Finally, click Save to create the redirect.