Skip to content

feat: add teacher organization name to frontend rendering#1177

Merged
bcordis merged 1 commit intodevelopmentfrom
feature/teacher-org-frontend
Mar 19, 2026
Merged

feat: add teacher organization name to frontend rendering#1177
bcordis merged 1 commit intodevelopmentfrom
feature/teacher-org-frontend

Conversation

@bcordis
Copy link
Member

@bcordis bcordis commented Mar 19, 2026

Summary

Exposes the teacher org_name field on frontend views so visitors can see the organization, not just schema.org crawlers.

Changes

  • Cwmpagebuilder.php — add org_name to teacher query SELECT (aliased as teacherorgname)
  • Cwmlisting.php — add teacherorgname to standard params, rendering case, and {{teacherorgname}} template code substitution
  • template.xml — Layout Editor fields for both ts (teacher list) and td (teacher detail) contexts
  • CustomField.php — add {{teacherorgname}} to template code picker

Display locations

  • Layout Editor: drag-and-drop element in teacher list and teacher detail contexts
  • Template codes: {{teacherorgname}} available in custom template text fields
  • Falls back gracefully — blank org_name renders nothing

Test plan

  • Open template editor → teacher elements show "Organization" option
  • Add teacherorgname element to a teacher context → renders org_name on frontend
  • Use {{teacherorgname}} in a custom template field → substitutes correctly
  • Teacher with no org_name → element renders empty (no errors)
  • All 538 PHPUnit tests pass
  • PHP syntax clean

Closes #1172

🤖 Generated with Claude Code

Expose org_name on frontend views via Layout Editor and template codes:
- Add org_name to teacher query in Cwmpagebuilder
- Add teacherorgname element rendering in Cwmlisting
- Add Layout Editor fields for ts/td contexts in template.xml
- Add {{teacherorgname}} template code variable

Closes #1172

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@bcordis bcordis merged commit 7700a77 into development Mar 19, 2026
6 checks passed
@bcordis bcordis deleted the feature/teacher-org-frontend branch March 19, 2026 02:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add teacher organization name to frontend rendering

1 participant