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
programwith a summary, content, featured image, a Sector reference to a newprogram_typevocabulary, 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.programswith block displays for the listing, rendered through thetext_card_mediumview 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/horizonaidfrom a dropped database: exit code 0, no error lines./programsrenders five programme rows, counted from the rendered/programs/<name>links./,/programs,/programs/education,/programs/health,/eventsand/countriesall return 200 with no TwigLoaderErrorand noComponentNotFoundException.- Content after install: 12 countries, 5 programmes, 3 events, 3 blog posts.
gitlab-ci-localruns 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, aprogram_typevocabulary, and the node fieldsfield_program_typeandfield_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