fix(trustlab): handle internal and external org links dynamically via CMS#1492
Merged
Conversation
…sations - Add `includeLink` checkbox (default true) to control whether an org displays a link; conditionally show the link group in admin UI - Update linkGroup to disable label and open-in-new-tab fields, keeping link config minimal - Fix Organisation/Organization label typos in both the collection and the ParticipatingOrganizationList block - Add isSortable and sortOptions to the organisations relationship field - Regenerate importMap (quote style only)
…d of page tree Replace the page-tree path derivation (api.findPage + fullSlugFromParents) with per-org includeLink/linkType/link.href fields set directly in the CMS. Custom links use link.href as-is; internal links append org.slug to the stored parent-page href.
blockify is already called after pagify in the common pipeline, so calling it inside pagifyOpportunities was double-processing every block. Remove the inner call; inject date/location into overview blocks directly before returning to the pipeline.
Link behaviour (same-tab vs new-tab) is now controlled at the org level via the CMS linkGroup config (disableOpenInNewTab). Rename ExternalLinkIcon import to LinkIcon to reflect that it appears on any linked chip, not only external ones.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ae28aaf7cd
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
kelvinkipruto
approved these changes
Jun 22, 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.
Description
Summary
Org links in
ParticipatingOrganizationListwere previously hardcoded: card-variant links were auto-derived by walking the CMS page tree, while chip-variant links used whatever was stored inlink.href— with no way for editors to control either. External and internal links were treated identically, and all chips opened in a new tab unconditionally.This fix moves link configuration onto each Organisation document: an
includeLinktoggle lets editors opt out entirely, and thelinkGrouplets them pick between a custom external URL or an internal page link. The blockify layer resolves the correct href based onlinkType, andtarget="_blank"is dropped since internal links should navigate in-place.Changes
includeLinkcheckbox and updatelinkGroupconfig (disableLabel,disableOpenInNewTab,required: false); makeslugrequired; fix Organisation/Organization label typosgetParticipatingOrganizationListBlock— replace hardcoded page-tree path derivation with per-orgincludeLink/linkType/link.hrefresolutionpagifyOpportunities— remove redundantblockifycall (blockify already runs after pagify in the common pipeline)ChipList— remove hardcodedtarget="_blank"; link behaviour is now driven by CMS configNotes for reviewers
includeLinkread astrue(Payload appliesdefaultValueat read time for fields absent in stored docs), so no data migration is needed.link.hrefis stored at org-save time via abeforeValidatehook. If the linked page is ever renamed, affected org documents need to be re-saved to refresh their stored href.Type of change
Screenshots
N/A
Checklist: