replaced ads link "_" _> "-"

This commit is contained in:
vedatakd 2019-07-18 10:58:43 +03:00
parent ef83066635
commit 6d22116684
6 changed files with 36 additions and 5 deletions

View File

@ -209,10 +209,12 @@ class AdvModel extends AdvsAdvsEntryModel implements AdvInterface
{
$id = $object->id;
$seo = str_slug($object->name);
$seo = str_replace('_','-',$seo);
return \route('adv_detail_seo', [$id,$seo]);
}
$id = $object->getObject()->id;
$seo = str_slug($object->getObject()->name);
$seo = str_replace('_','-',$seo);
return \route('adv_detail_seo', [$id,$seo]);
}
@ -222,6 +224,7 @@ class AdvModel extends AdvsAdvsEntryModel implements AdvInterface
{
$id = $adv->id;
$seo = str_slug($adv->name);
$seo = str_replace('_','-',$seo);
return \route('adv_detail_seo', [$id,$seo]);
}
}

View File

@ -156,6 +156,7 @@ class AdvsController extends PublicController
}
$adv = $advRepository->getListItemAdv($id);
$adv->meta_tags = explode(' ',$adv->name);
$recommended_advs = $advRepository->getRecommendedAds($adv->id);
foreach ($recommended_advs as $index => $ad) {

View File

@ -0,0 +1,10 @@
<?php
return [
'meta_tags' => [
'type' => 'anomaly.field_type.tags',
'config' => [
'default_value' => ['Openclassify'],
],
],
];

View File

@ -0,0 +1,8 @@
<?php
return [
'meta_tags' => [
'name' => 'Meta Keywords',
],
];

View File

@ -0,0 +1,8 @@
<?php
return [
'meta_tags' => [
'name' => 'Anahtar Kelimeler',
],
];

View File

@ -17,12 +17,13 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<meta name="description" content="{{ trans(template.meta_description) }}"/>
{% if app.request.pathInfo == "/" %}
<meta name="keywords" content="{% for tag in setting_value('visiosoft.theme.default::meta_tags') %}{{ tag }},{% endfor %}">
{% else %}
<meta name="keywords" content="{% for tag in adv.meta_tags %}{{ tag }},{% endfor %}">
{% endif %}
<title>
{{ setting_value('streams::name', config_get('streams::distribution.name')) }}
&#8250;
{{ trans(template.meta_title) }}
</title>
<title>{{ setting_value('streams::name', config_get('streams::distribution.name')) }}|{{ trans(template.meta_title) }}</title>
<!-- Favicon -->
{#{{ favicons("theme::img/favicon.png") }}#}