From 92d4a89809795991c6bbfaef047e5b8c75bd69de Mon Sep 17 00:00:00 2001 From: Diatrex Date: Wed, 26 Aug 2020 11:08:50 +0300 Subject: [PATCH] #2027 SEO small changes --- .../src/Http/Controller/advsController.php | 16 +++++++--- .../resources/views/partials/navigation.twig | 32 ++++++++++++++----- 2 files changed, 35 insertions(+), 13 deletions(-) diff --git a/addons/default/visiosoft/advs-module/src/Http/Controller/advsController.php b/addons/default/visiosoft/advs-module/src/Http/Controller/advsController.php index 65eca8331..d01054fbf 100644 --- a/addons/default/visiosoft/advs-module/src/Http/Controller/advsController.php +++ b/addons/default/visiosoft/advs-module/src/Http/Controller/advsController.php @@ -278,10 +278,6 @@ class AdvsController extends PublicController $radio = $returnvalues['radio']; } - if (!empty($param['user'])) { - $user = $this->userRepository->find($param['user']); - } - Cookie::queue(Cookie::make('last_search', $this->requestHttp->getRequestUri(), 84000)); $viewType = $this->requestHttp->cookie('viewType'); @@ -302,6 +298,12 @@ class AdvsController extends PublicController $this->template->set('meta_title', $catText); } + if (!empty($param['user'])) { + $user = $this->userRepository->find($param['user']); + $this->template->set('showTitle', false); + $this->template->set('meta_title', $user->name() . ' ' . trans('visiosoft.module.advs::field.ads')); + } + $compact = compact('advs', 'countries', 'mainCats', 'subCats', 'checkboxes', 'request', 'param', 'user', 'featured_advs', 'viewType', 'topfields', 'selectDropdown', 'selectRange', 'selectImage', 'ranges', 'seenList', 'searchedCountry', 'radio', 'categoryId', 'cityId', 'allCats', 'catText'); @@ -400,7 +402,11 @@ class AdvsController extends PublicController $this->template->set('meta_keywords', implode(',', explode(' ', $adv->name))); $this->template->set('meta_description', strip_tags($adv->advs_desc, '')); - $this->template->set('meta_title', $adv->name . "|" . end($categories)['name']); + $this->template->set('showTitle', false); + $this->template->set( + 'meta_title', + $adv->name . " " . end($categories)['name'] . ' ' . setting_value('streams::domain') + ); if (substr($adv->cover_photo, 0, 4) === "http") { $coverPhoto = $adv->cover_photo; } else { diff --git a/addons/default/visiosoft/base-theme/resources/views/partials/navigation.twig b/addons/default/visiosoft/base-theme/resources/views/partials/navigation.twig index 3b0bc3433..69fc9b22e 100644 --- a/addons/default/visiosoft/base-theme/resources/views/partials/navigation.twig +++ b/addons/default/visiosoft/base-theme/resources/views/partials/navigation.twig @@ -28,16 +28,24 @@ {% endif %} @@ -47,16 +55,24 @@ {% endif %}