Contents Menu Expand Light mode Dark mode Auto light/dark, in light mode Auto light/dark, in dark mode Skip to content
TAMU Digital Collections Labs documentation
TAMU Digital Collections Labs documentation

Overview of Digital Collections Services

  • Digital Collections Services
  • Mission and Vision
  • People
  • Cultural Heritage Collections
  • Products and Product Ownership
  • Glossary
  • Department and Supervisor Onboarding Checklist
  • Partners and Stakeholders
  • Legacy Infrastructure, Software, and Systems

Policies and Procedures

  • Policy and Guiding Principles for Captioning and Transcription of A/V Works
  • Metadata Guidelines for Digital Resources at Texas A&M University Libraries

Applications and Workflows

  • Archipelago
    • Terminology
    • Creating new ADOs
    • Bulk updating metadata
    • Adding OCR to ADOs
    • ADO Types in Archipelago
    • Crosswalking from DSpace, Fedora, and Avalon to Archipelago
    • Changing Structures on Archipelago
    • Linked data and multivalue fields
    • Promoting Collections on the Front Page
    • Uploading Pre-Created HOCR with Books
    • Featured Collections and Featured Works
    • Add URL alias for a Node
    • Testing JMES Paths
    • Changing Branding in Archipelago
    • Associating HTR with Image Files
    • Changing colors to fit TAMU brand
    • Changing fields for search facets
    • Changing the template for a worktype
    • Removing Date Updated from Search Results
    • Modifying the Webform
    • Migrating from Avalon
    • Migrating from Fedora
    • Migrating Using Innovation Site
    • Migrating from a directory of jsons
    • Migrating from OAKTrust
  • Avalon
    • Importing media into Avalon via API Key
    • Importing media into Avalon
    • Template for Avalon Batch Imports
    • Downloading media from Avalon
    • Generating Structures from CSV
    • Avalon Metadata
    • How to make a PDF transcript to upload to Avalon
    • Remediating Failed Imports in Avalon
    • Troubleshooting Various Avalon Wonky-ness
  • DSPACE & Oaktrust
    • Understanding Our DSPACE Entities
    • Batch Importing SAFs Using the DSpace Command Line
    • Features and Tests for DSPACE 9
    • Batch Import into DSpace Using SAFCreator
    • DSPACE Entity Configuration
    • DSPACE: Extending Embargos in DSpace
    • DSPACE: Importing Basic Items
    • DSPACE: Importing Entities
    • DSPACE: Importing Entities from OJS
    • Moving Collections from One Community to Another
    • OAKTrust and DSPACE Statistcs
    • RDFizing DSPACE Works to Generate Manifests
    • Reporting 500 Errors
  • Fedora
    • Creating IIIF Collections and Manifests
    • Understanding Solr Config in Fedora
    • Reindexing Solr
    • Using Karaf
  • OJS
    • Applying for an ISSN
    • Minting DOIs in OJS
    • OJS 3.4 Editorial Workflow: Configuration & Practice
    • OJS and DOI Metadata
    • 1-Hour Journal Onboarding Checklist
  • Open ONI
    • How to Process a Batch
    • Batches: Loading and Purging
    • Solving Open Oni Issues
  • SAGE
    • Deleting Items from SAGE Solr
    • Importing media into SAGE - WITHOUT Rancher
    • SAGE Import
    • SAGE: Solr 6 versus Solr 9
  • Spotlight
    • Creating a Browse Category
    • Creating and Modifying Exhibits
    • Troubleshooting Write Issues

Other Services and Topics

  • Accessibility
    • PDF Accessibility
  • Audio: Creating Service Files for Streaming
  • Images: Generating Service Files and Derivatives
  • Identifiers
    • General Requirements for Crossref DOIs
    • Conventions for Structuring DOIs
    • Minting DOIs in Crossref
    • Minting ARKs with EZID
  • IIIF
    • Adding a Thumbnail to a IIIF Manifest
    • Finding IIIF
    • Fixing Broken Cache from IR IIIF Service
    • IIIF: Generating IIIF and IIIF Collections
  • Kubernetes and Docker
    • Configuring and Using Kubectl to Access PODs without a Browser
    • Running Detached Processes in a Docker Container
  • Open Education Materials and IP
  • Renaming Files from Preservation for Technology Services
  • Using the Super Computer when we Need GPU
  • Whisper
    • Making Transcripts with Whisper
    • Cleaning a Whisper Transcript
    • Making Transcripts with WhisperX
  • How to Write Documentation on this website

Configurations and Mappings

  • Cantloupe Configuration

Crosswalking

  • Crosswalking: Avalon to PDF
  • Creating ARKs with TAMU ID Minter
  • Convert MARC Binary to TAMU DC

Digitization Backlog

  • University Archives
    • College of Architecture and Environmental Design Publications
    • Department of Mathematics Publications
    • College of Liberal Arts Publications
    • College of Education Publications
    • College of Business Administration Publications
    • College of Medicine Publications
    • College of Engineering Publications
    • College of Agriculture Animal Science Department Technical Reports and Publications
    • Department of Agricultural Engineering Publications
    • Department of Civil Engineering Newsletter
    • Texas A&M Commencement Programs
    • Commencement Programs Collection - College of Medicine
    • Commencement Programs Collection - College of Veterinary Medicine
    • Commencement Programs Collection - School of Public Health
    • Texas A&M System Board of Directors Minutes
    • Texas A&M System Board of Regents Agendas
    • Office of Executive Vice President and Provost Records
    • Texas A&M System Annual Reports
    • Thomas S. Gathright Letters
    • Texas A&M Athletic Media Guides and Programs - Track and Field
    • Texas A&M Athletic Media Guides - Aquatics
    • Texas A&M Athletic Media Guides - Spring Sports
    • Texas A&M Athletic Media Guides - Soccer
    • Texas A&M Athletic Media Guides - Women’s Basketball
    • Texas A&M Athletic Programs - Baseball
    • Texas A&M Athletic Programs - Softball
    • Texas A&M Athletic Programs - Men’s Basketball
    • Texas A&M Athletic Programs - Volleyball
    • Texas A&M Athletic Programs - Football
    • Texas A&M Speeches

DPMT Archived

  • Digital Projects that Require Digitization Workflows
  • DPMT Workflow

Archived

  • Archived - Projects
Back to top
View this page

Featured Collections and Featured Works¶

The TAMU Digital Collections front page displays two curated sections: Featured Collections and Featured Works. These views surface hand-picked content to site visitors by curators. Both sections are driven by Drupal’s core promote field, a Search API Solr view, and a small amount of custom theme code.

How It Works¶

The overall flow for both sections is identical:

  1. An editor checks a “Featured on front page” checkbox on a node edit form.

  2. The checkbox saves 1 to the node’s core promote field.

  3. A Search API Solr view filters for promote = 1 and renders matching nodes as cards.

  4. The view block is placed on the front page and restricted to <front> via block visibility settings.

The Promote Checkbox¶

Drupal’s promote field exists on all node types but is hidden by default in Archipelago. The TAMU theme exposes it through two hook_form_FORM_ID_alter implementations in web/themes/custom/tamu_theme/tamu_theme.theme.

For Digital Object Collections:

function tamu_theme_form_node_digital_object_collection_edit_form_alter(
    &$form, FormStateInterface $form_state, $form_id)

For Digital Objects:

function tamu_theme_form_node_digital_object_edit_form_alter(
    &$form, FormStateInterface $form_state, $form_id)

Both hooks add a checkbox to the Advanced sidebar of the node edit form and attach a shared submit handler:

function tamu_theme_promote_node_submit($form, FormStateInterface $form_state) {
  $node = $form_state->getFormObject()->getEntity();
  $node->set('promote', (int) $form_state->getValue('tamu_promote'));
  $node->save();
}

Note

After checking or unchecking the box and saving, the Search API Solr index must pick up the change. This usually happens within a few minutes via cron. To force it immediately go to Configuration → Search API → [your index] → Queue all items → Index now.

Solr Index¶

The promote field must be present in the Search API index for the view filters to work.

  1. Go to Configuration → Search API → [index] → Fields.

  2. Confirm Promoted to front page is listed (machine name promote, type Integer).

  3. If it is missing, click Add fields, find it under Content, add it, save, and re-index.

Warning

You may see the message “Your config-set contains manually added customizations.” after adding this field. This is harmless — it simply means the Solr config was modified through the UI rather than regenerated from scratch. The field will continue to work correctly.

Views¶

Featured Collections¶

  • View machine name: solr_search_collections

  • Display: a dedicated Block display within the collections view

  • Filter: Content type = Digital Object Collection AND promote = 1

  • Row style: Content rendered in the digital_object_with_thumbnail_for_grid display mode

  • Block visibility: restricted to <front>

Featured Works¶

  • View machine name: duplicate_of_collections

  • Display: Block display

  • Filter: Content type = Digital Object AND promote = 1

  • Row style: Content rendered in the digital_object_with_thumbnail_for_grid display mode

  • Block visibility: restricted to <front>

Note

The custom_frontpage view (path /node) also filters on promote = 1. To prevent promoted Digital Objects from rendering there in full-node mode, that view has a filter excluding the digital_object content type. If you see a promoted item appearing in an unexpected place, check that view’s filter criteria.

Card / Masonry Rendering¶

Both sections share the same card and masonry layout used by the collection membership grid.

Display mode¶

The digital_object_with_thumbnail_for_grid display mode renders each node using:

  • DS layout: ds-1col

  • Theme template: web/themes/custom/tamu_theme/templates/node/ds-1col--node-digital-object-with-thumbnail-for-grid.html.twig

    This template outputs a .tamu-card wrapper with a thumbnail image region and a title/body region. The thumbnail is produced by the Strawberry Field formatter, which calls the tamu_custom_simple_card_thumbnail metadata display Twig template (stored in Archipelago’s metadata display system, not in the theme file system).

Thumbnail template¶

Location (in Archipelago’s metadata display UI, not on disk):

tamu_custom_simple_card_thumbnail

This template builds a IIIF Image API URL from the node’s JSON data and renders a plain <img> tag. The image size is controlled by the iiif_size variable at the top of that template (e.g. pct:25 for 25 % of the full image width).

Masonry CSS¶

The masonry layout is applied by web/themes/custom/tamu_theme/css/cards.css.

The view’s unformatted list template must wrap each row in a plain <div> for the CSS columns layout to work correctly in Firefox:

  • Featured Collections template: templates/views/views-view-unformatted--solr-search-collections.html.twig

  • Featured Works template: templates/views/views-view-unformatted--duplicate-of-collections.html.twig

Both templates have the same structure:

<div class="tamu-cards-grid w-100">
  {% for row in rows %}
    <div>{{ row.content }}</div>
  {% endfor %}
</div>

The tamu-cards-grid class triggers the CSS columns grid. Without the inner <div> wrapper, Firefox renders all cards in a single row instead of columns.

Adding a Featured Item¶

Collections¶

  1. Edit the Digital Object Collection node.

  2. In the Advanced sidebar, check Featured on front page.

  3. Save.

  4. Wait for Solr to re-index (or force it manually).

  5. The collection will appear in the Featured Collections block on the front page.

Digital Objects (Works)¶

  1. Edit the Digital Object node.

  2. In the Advanced sidebar, check Featured on front page.

  3. Save.

  4. Wait for Solr to re-index (or force it manually).

  5. The item will appear in the Featured Works block on the front page.

Removing a Featured Item¶

Uncheck Featured on front page on the node edit form and save. The item will disappear from the front page after the next Solr index cycle.

Relevant File Locations¶

File

Purpose

tamu_theme/tamu_theme.theme

Promote checkbox hooks and submit handler

tamu_theme/css/cards.css

Masonry grid and card image styles

tamu_theme/templates/node/ds-1col--node-digital-object-with-thumbnail-for-grid.html.twig

Card HTML structure

tamu_theme/templates/views/views-view-unformatted--solr-search-collections.html.twig

Featured Collections masonry wrapper

tamu_theme/templates/views/views-view-unformatted--duplicate-of-collections.html.twig

Featured Works masonry wrapper

Archipelago metadata display: tamu_custom_simple_card_thumbnail

IIIF thumbnail URL builder (managed in Drupal UI)

Next
Add URL alias for a Node
Previous
Uploading Pre-Created HOCR with Books
Copyright © 2026, Texas A&M Libraries - Digital Collections Services
Made with Sphinx and @pradyunsg's Furo
On this page
  • Featured Collections and Featured Works
    • How It Works
    • The Promote Checkbox
    • Solr Index
    • Views
      • Featured Collections
      • Featured Works
    • Card / Masonry Rendering
      • Display mode
      • Thumbnail template
      • Masonry CSS
    • Adding a Featured Item
      • Collections
      • Digital Objects (Works)
    • Removing a Featured Item
    • Relevant File Locations