We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 009d2f1 commit 320386eCopy full SHA for 320386e
templates/layout/default.php
@@ -16,6 +16,7 @@
16
17
$cakeDescription = 'CakePHP Plugins';
18
$request = $this->getRequest();
19
+$canonicalUrl = $this->Url->build($request->getPath() ?: '/', ['fullBase' => true]);
20
$isPackagesIndex = $request->getParam('controller') === 'Packages' && $request->getParam('action') === 'index';
21
$searchValue = (string)$request->getQuery('search', '');
22
$cakephpSlugs = (array)$request->getQuery('cakephp_slugs', []);
@@ -31,6 +32,7 @@
31
32
<?= $this->fetch('title') ?>
33
</title>
34
<?= $this->Html->meta('icon') ?>
35
+ <link rel="canonical" href="<?= h($canonicalUrl) ?>">
36
37
<?= $this->Html->css(['cake']) ?>
38
0 commit comments