Skip to content

Commit 5772488

Browse files
authored
improv. fix seo with multiple sub-urls
1 parent 224fa4d commit 5772488

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

app/Controller/AppController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,7 @@ public function __initSeoConfiguration()
533533
$default = $this->Seo->find('first', ["conditions" => ['page' => null]])['Seo'];
534534
$current_url = $this->here;
535535
$get_page = [];
536-
$check = $this->Seo->find('first', ['conditions' => ["'" . $current_url . "' LIKE CONCAT(page, '%')"]]);
536+
$check = max($this->Seo->find('all', ['conditions' => ["'" . $current_url . "' LIKE CONCAT(page, '%')"]]));
537537
if ($check && ($check['Seo']["page"] == $current_url || $current_url != "/"))
538538
$get_page = $check['Seo'];
539539
$seo_config['title'] = (!empty($default['title']) ? $default['title'] : "{TITLE} - {WEBSITE_NAME}");

0 commit comments

Comments
 (0)