Skip to content

Commit

Permalink
fix: no backlinking in breadcrumbs to GMM body overviews from GMM bodies
Browse files Browse the repository at this point in the history
Ensures that backlinks are available in the breadcrumbs.
  • Loading branch information
tomudding committed Nov 29, 2024
1 parent e2e2969 commit 826912f
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 9 deletions.
4 changes: 2 additions & 2 deletions module/Application/view/partial/main-nav.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -282,12 +282,12 @@ endif; ?>
</li>
<li>
<a href="<?= $this->url('home/committee_list') ?>">
<?= $this->translate('Committees') ?>
<?= OrganTypes::Committee->getPluralName($translator) ?>
</a>
</li>
<li>
<a href="<?= $this->url('home/fraternity_list') ?>">
<?= $this->translate('Fraternities') ?>
<?= OrganTypes::Fraternity->getPluralName($translator) ?>
</a>
</li>
<li class="dropdown dropdown-submenu">
Expand Down
34 changes: 27 additions & 7 deletions module/Frontpage/view/frontpage/organ/organ.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ use Laminas\View\Renderer\PhpRenderer;
// set title
$this->headTitle($organ->getName());

$lang = $this->plugin('translate')->getTranslator()->getLocale();
$translator = $this->plugin('translate')->getTranslator();
$lang = $translator->getLocale();
$organInformation = $organ->getApprovedOrganInformation();
function getOrganDescription($organInformation, $lang)
{
Expand Down Expand Up @@ -56,23 +57,42 @@ function getOrganDescription($organInformation, $lang)
<section class="section section-breadcrumb">
<div class="container">
<ol class="breadcrumb">
<li class="active">
<a href="<?= $this->url(
'home/page',
[
'category' => 'vereniging',
'categoryEn' => 'association',
],
) ?>">
<?= $this->translate('Association') ?>
</a>
</li>
<li class="active">
<?php if (OrganTypes::Fraternity === $organ->getType()): ?>
<a href="<?= $this->url('home/fraternity_list') ?>">
<?= $this->translate('Fraternities') ?>
<?= OrganTypes::Fraternity->getPluralName($translator) ?>
</a>
<?php elseif (OrganTypes::Committee === $organ->getType()): ?>
<a href="<?= $this->url('home/committee_list') ?>">
<?= $this->translate('Committees') ?>
<?= OrganTypes::Committee->getPluralName($translator) ?>
</a>
<?php elseif (OrganTypes::AVC === $organ->getType()): ?>
<?= $this->translate('GMM Committees') ?>
<a href="<?= $this->url('home/gmm_bodies/avc_list') ?>">
<?= OrganTypes::AVC->getPluralName($translator) ?>
</a>
<?php elseif (OrganTypes::AVW === $organ->getType()): ?>
<?= $this->translate('GMM Taskforces') ?>
<a href="<?= $this->url('home/gmm_bodies/avw_list') ?>">
<?= OrganTypes::AVW->getPluralName($translator) ?>
</a>
<?php elseif (OrganTypes::KCC === $organ->getType()): ?>
<?= $this->translate('Financial Audit Committees') ?>
<a href="<?= $this->url('home/gmm_bodies/kcc_list') ?>">
<?= OrganTypes::KCC->getPluralName($translator) ?>
</a>
<?php elseif (OrganTypes::RvA === $organ->getType()): ?>
<?= $this->translate('Advisory Boards') ?>
<a href="<?= $this->url('home/gmm_bodies/rva_list') ?>">
<?= OrganTypes::RvA->getPluralName($translator) ?>
</a>
<?php endif; ?>
</li>
<li class="active">
Expand Down

0 comments on commit 826912f

Please sign in to comment.