1648: Views Block Rework: Generalize directory grid into card grid options (cards-per-row + profile data pass-throughs) - #514
Open
dblanken-yale wants to merge 1 commit into
Conversation
The card and list design options render profiles through the shared reference
card, which can now show department, email, phone and pronouns. Pass those
fields plus the matching toggles that hook_views_pre_render() sets on each
result node, so a people listing can carry the same detail the profile-only
directory card hardcoded.
Email and phone go through as raw field values rather than rendered field
output, because the component builds the mailto:/tel: links itself.
Only these two view modes: directory renders the separate directory-listing
card, which shows this data unconditionally and ignores the flags, and
condensed renders none of it.
The explanatory comment sits above the embed rather than inside its with{}
hash on purpose. Twig comments are not legal inside a tag — one in the hash
makes the template fail to compile with "Unclosed block", which takes every
page carrying a people card grid to an HTTP 500.
Claude-Session: https://claude.ai/code/session_01Kdr7Qytn3hXDByx6nUXn3i
This was referenced Sep 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
1648: Views Block Rework: Generalize directory grid into card grid options (cards-per-row + profile data pass-throughs)
Theme half of yalesites-org/YaleSites-Internal#1648: passes the profile contact fields
through to the shared reference card.
Description of work
node--profile--card.html.twigandnode--profile--list-item.html.twignow passdepartment, email, phone and pronouns to
@molecules/cards/reference-card, along with thematching
show_*flags thathook_views_pre_render()sets on each result node.content.field_email[0]['#context'].value)rather than rendered field output, so the component can build the
mailto:/tel:linksitself.
directoryrenders the separate directory-listing card, whichshows this data unconditionally and ignores the flags, and
condensedrenders none of it.{% embed %}, not inside thewith {}hash. Twig comments are not legal inside a tag —a
{# #}in the hash makes the template fail to compile withSyntaxError: Unclosed "block", and every page carrying a People card grid returnsHTTP 500. That is exactly what happened during development and is why the comment says so.
Base branch is
1318-views-rework, notdevelop— this builds on the Views BlockArchitectural Rework (yalesites-org/YaleSites-Internal#1161).
Functional testing steps:
mailto:link and the phone a workingtel:link.References yalesites-org/YaleSites-Internal#1648
https://claude.ai/code/session_01Kdr7Qytn3hXDByx6nUXn3i