Skip to content

list of all include commands

StrikkerGodt edited this page Oct 15, 2021 · 19 revisions

Note

If you copy and paste an 'include' command into Visual Studio Code it may transcribe the quotation marks ("") incorrectly, causing an error. To fix this error, just delete the quotation marks that were copied and re-type them.

list of all include commands

NOTE: you can always search for the base command in Visual Studio Code to see other examples of when a command was used!


image.html

  • {% include feature/image.html objectid="lumber###' %}
  • {% include feature/image.html objectid="link to object' link="link to page" caption="whatever the caption is" %}

digital-image.html includes

For specific instructions on each collection, see the digital collections and paths FOR HARVESTER spreadsheet.

  • {% include feature/digital-image.html collection="path" objectid="objectid" %}
  • {% include feature/digital-image.html cdm-collection="cdmid" collection="path" objectid="objectid" %}
  • {% include feature/image.html objectid="link to object' link="link to page" caption="whatever the caption is" %}
    • use this for images in digital collections that don't seem to work with the first 2 include commands. This is a fail-safe, it'll work every time, it's just not preferred because you're manually adding the image rather than automatically pulling it from the digital collection JSON files.

pdf includes

  • {% include feature/item-pdf-embed.html objectid="lumber###" %}
    • use this for pdfs that are included in the Lumber collection
  • {% include feature/digital-pdf-image.html %} or {% include feature/digital-pdf-embed.html %}
    • use this for pdfs that are currently in CONTENTdm or the Digital Collections. NOTE: sometimes these includes do not work, depending on the collection. In that case, you can right-click on the pdf, open image in new tab, and copy the URL for just that image, and use this include: {% include feature/image.html objectid="link to object' link="link to page" caption="whatever the caption is" %}

A note on including an image of a PDF (as detailed just above): when using the {% include feature/image.html objectid="link to object' link="link to page" caption="whatever the caption is" %} for a PDF include, it's sometimes best to use a "singleitem" link for the embed, since CONTENTdm can sometimes change the number of the image used to represent the item rather than it's contentdm-id number. Here's an example of how you would use the "singleitem" link for the include mentioned above:

{% include feature/image.html objectid="https://digital.lib.uidaho.edu/digital/api/singleitem/image/ui_ep/645/default.jpg" link="https://www.lib.uidaho.edu/digital/uiext/items/uiext665.html" caption="Analysis of potato packing costs in Idaho, 1950 - 1951 seasons (208, Experiment Station Bulletin, 1954)" %}

However, ONLY USE THE "SINGLEITEM" LINK WHEN INCLUDING AN IMAGE FROM A PDF THAT LIVES IN CONTENTDM! If you're including just a regular image from CONTENTdm, do NOT use a "singleitem" link. Here's an example of including just an image from CONTENTdm:

https://digital.lib.uidaho.edu/digital/iiif/cccidaho/177/full/pct:40/0/default.jpg

  • NOTE: with this type of link, you can change the number after the "pct:" to make the image larger or smaller depending on your needs.