Skip to content

Commit d3325cd

Browse files
committed
feat: add cannonical url to header
1 parent 9b69dca commit d3325cd

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

src/Classes/ViewModels/ModuleViewModel.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,12 @@ public function isChanged(): bool
235235
return $this->module->isChanged();
236236
}
237237

238+
public function getCanonicalUrl(): string
239+
{
240+
return MMLC_ROOT . $this->module->getArchiveName();
241+
}
242+
243+
238244
/**
239245
* @param string $action
240246
* @param string $ref

src/Templates/Head.tmpl.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
<?php } else { ?>
1717
<title><?= $moduleView->getName() ?> - 📦 Modul fürs modified Shop System</title>
1818
<meta name="description" content="<?= $module->getShortDescription() ?>"/>
19+
<link rel="canonical" href="<?= $moduleView->getCanonicalUrl() ?>" />
1920
<?php } ?>
2021

2122
<?php

0 commit comments

Comments
 (0)