feat: #3613697 Add a Program content type and render the programmes page from the programs view

Issue: #3613697 Add a Program content type and render the programmes page from the programs view

What this adds

Programmes become content, following how Varbase Blog Base manages a content type and how the Educare site template structures its Program type, adapted for an aid organisation.

  • Content type program with a summary, content, featured image, a Sector reference to a new program_type vocabulary, and a Countries reference to the Country content type, so a programme states where it runs.
  • Form display, a card view display and its Drupal Canvas content template.
  • views.view.programs with block displays for the listing, rendered through the text_card_medium view mode, and a pathauto pattern so a programme lives at /programs/[node:title].
  • The Our Programs page now renders that view. The five hand-placed programme blocks are gone: 59 Canvas components removed from one page.
  • Five programmes carrying the copy and images that were already on the page — Education, Women, Agriculture, Medicine and Health — each linked to the countries where it runs, with its sector term.

The programs view and both Canvas templates are repointed with setViewsComponentStyleTheme and repointComponentTreeToTheme, the same way the blog, countries and events views are, so they render through the site theme.

How this was verified

  • drush site:install recipes/horizonaid from a dropped database: exit code 0, no error lines.
  • /programs renders five programme rows, counted from the rendered /programs/<name> links.
  • /, /programs, /programs/education, /programs/health, /events and /countries all return 200 with no Twig LoaderError and no ComponentNotFoundException.
  • Content after install: 12 countries, 5 programmes, 3 events, 3 blog posts.
  • gitlab-ci-local runs the project pipeline green (build:composer-validate, validate:yaml-lint).

User interface changes

  • A Program content type is available, and programmes are published at /programs/[node:title].
  • The Our Programs page follows the content instead of hand-placed blocks.

API changes

None.

Data model changes

  • New content type program, a program_type vocabulary, and the node fields field_program_type and field_countries.

Release notes snippet

  • Added a Program content type with five programmes and moved the Our Programs page onto the programs view.

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