Jump to content

ICT:D Publish ready view of a record

From Costa Sano MediaWiki

Publisher-Ready Single Record View (Drupal UI Only)

This document describes how to create a clean, read-only “record view” for any content type. The goal is to provide publishers with a page that shows:

  • The most important fields of the record
  • A full description text
  • A table of attached assets
  • Links to the asset-chain view
  • No edit buttons, no tabs, no clutter

All steps use Drupal UI only. No custom code is required.

1. Create a New View for Single-Record Display

Navigate to:

Structure → Views → Add view

Configure the new View:

  • View name: Record View – [Your Content Type]
  • Show: Content
  • Of type: Your content type
  • Create a page: Yes
  • Page path: /record-view/%
  • Page display: Unformatted list (or Fields)
  • Items per page: 1
  • Menu: None
  • Pager: None

This creates a page that will display exactly one record.

2. Add a Contextual Filter to Load the Correct Record

In the View:

1. Add contextual filter: Content: Nid 2. Configure it as follows:

When the filter value is NOT in the URL → Display nothing
When the filter value IS in the URL → Load the corresponding record

This makes the View show the record whose node ID appears in the URL.

Example:

/record-view/123

shows record 123.

3. Choose Which Fields to Display

Remove all default fields.

Add only the fields you want publishers to see, for example:

  • Title
  • Description (full text)
  • Summary
  • Key metadata fields
  • Location
  • Dates
  • Any other important fields

Arrange them in a logical order.

This creates a clean, read-only presentation.

4. Add the Attached Assets Table

There are two possible methods.

4.1 Method A: Using a Relationship (if assets are referenced directly)

If your content type has a media reference field:

1. Add relationship: Content → [Your Media Field] 2. Add fields from the Media entity:

  * Media name
  * Media type
  * File URL
  * Thumbnail

3. Set the View format to Table 4. Group or sort as needed

This produces a table of assets under the record.

4.2 Method B: Embedding Your Existing Asset-Chain View

If you already have a View that lists assets for a record:

1. Add a new field: View field 2. Select your asset-chain View 3. Pass the node ID as contextual filter:

  * Use token: Template:nid

This embeds the asset-chain table directly into the record view.

Navigate to:

Structure → Views → Content

This is the admin listing of all records.

Add a new field:

  • Global: Custom text

Configure it:

1. Enable “Rewrite results” 2. Use custom text such as:

<a href="/record-view/{{ nid }}">View</a>

3. Enable “Use replacement tokens” 4. Insert the token for node ID

This adds a “View” link next to each record.

If you have a boolean field “Completed”:

1. Add the field to the admin View 2. In the “View” link field:

  * Enable “Rewrite results”
  * Add a condition:
{% if completed == '1' %}
  <a href="/record-view/{{ nid }}">View</a>
{% endif %}

This ensures only finished records show the publisher view link.

7. Result

You now have:

  • A clean, read-only page for each record
  • A full description field
  • A table of attached assets
  • Links to the asset-chain
  • A link from the admin table to this page
  • No edit buttons, no tabs, no clutter
  • A publisher-ready output suitable for drafting publications or website pages

8. Notes

  • This solution uses only Drupal UI.
  • No custom code, no theming, no templates.
  • Works for multilingual sites.
  • Works for all content types.
  • Fully successor-friendly.