feat: #3613646 Add a Country content type with its listing, cards and full page layout

Issue: #3613646 Add a Country content type with its listing, cards and full page layout

What this adds

Countries become real content instead of one hand-built canvas page.

  • Content type country, modelled on how Varbase Blog Base manages a content type: 7 new field storages and 9 field instances (summary, featured image, our role, on the ground text and image, figures description, three key figures with their descriptions, key partners).
  • Form display, card and overlay_card_medium view displays with their Drupal Canvas content templates.
  • The full Canvas template implements the design: hero (country name, summary, image), Our Role, On the Ground, By the Numbers, Key Country Partners.
  • views.view.countries with block displays for the listing and the "see other countries" section, and a pathauto pattern so a country lives at /countries/[node:title].
  • Five demo countries — Afghanistan, Ecuador, Kenya, Lebanon, Ukraine — each with its own hero image taken from the Horizon Aid design file, shipped as recipe default content (file plus media entities, editor-facing names and alt text).
  • The Country Page canvas page and the menu links that pointed at it are removed.

Notes on the implementation

  • The template's components are declared against the base theme and repointed with repointComponentTreeToTheme: {theme: default}, so the component versions resolve on the site that applies the recipe instead of being pinned to one build.
  • The key figures are built from heading and text rather than the figure component: figure exposes no props to a Canvas content template, which aborts the install. Reported separately on the theme.
  • Images bound from entity fields currently render with a relative source, which affects blog pages too. Reported separately on the theme; it is not introduced here.
  • Two sections of the design are not placed yet: the per-country updates listing (needs a relation between blog posts and countries) and "See Other Countries" (needs the views block to exist as a Canvas component).

How this was verified

  • drush site:install recipes/horizonaid from a dropped database: exit code 0, no error lines, no file-metadata errors.
  • /, /countries, /countries/afghanistan and /countries/kenya all return 200 with no Twig LoaderError and no ComponentNotFoundException; /country-page correctly returns 404.
  • Five country nodes are created with /countries/<name> aliases and their own images.
  • gitlab-ci-local runs the project pipeline green (build:composer-validate, validate:yaml-lint).

User interface changes

  • A Country content type is available, and countries are published at /countries/[node:title].
  • The Country Page canvas page no longer ships.

API changes

None.

Data model changes

  • New content type country and new node fields: field_our_role, field_on_the_ground, field_on_the_ground_image, field_figures_description, field_figure_number, field_figure_description, field_partners.

Release notes snippet

  • Added a Country content type with its listing, card and full page layouts, five demo countries with design images, and removed the single Country Page canvas page.

AI-Generated: Yes

Checkpoints

  • File an issue about this project
  • Addition/Change/Update/Fix to this project
  • Testing to ensure no regression
  • Automated unit/functional testing coverage
  • Developer Documentation support on feature change/addition
  • User Guide Documentation support on feature change/addition
  • UX/UI designer responsibilities
  • Accessibility and Readability
  • Reviewed by a human
  • Code review by maintainers
  • Full testing and approval
  • Credit contributors
  • Review with the product owner
  • Update Release Notes
  • Release
Edited by Rajab Natshah

Merge request reports

Loading
Loading