mirror of
https://github.com/openclassify/openclassify.git
synced 2026-02-10 07:16:06 -06:00
#74 Improvements of SEO link structure like Vebze (there was an error)
This commit is contained in:
parent
941613db33
commit
d5ea3ab18b
@ -1,4 +1,8 @@
|
|||||||
|
{% set formHtml %}
|
||||||
|
<form action="{{ url_route('visiosoft.module.advs::list') }}" method="get">
|
||||||
|
{% endset %}
|
||||||
{% if 'cat' in param|keys %}
|
{% if 'cat' in param|keys %}
|
||||||
|
{% if not param['cat'] is empty %}
|
||||||
{% set catId = entries('cats', 'category').find(param['cat']) %}
|
{% set catId = entries('cats', 'category').find(param['cat']) %}
|
||||||
{% set cityId = null %}
|
{% set cityId = null %}
|
||||||
{% if 'city' in param|keys %}
|
{% if 'city' in param|keys %}
|
||||||
@ -7,10 +11,12 @@
|
|||||||
{% set cityId = entries('location', 'cities').find(param['city'][0]) %}
|
{% set cityId = entries('location', 'cities').find(param['city'][0]) %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% set formHtml %}
|
||||||
<form action="{{ url_route('adv_list_seo', [catId.slug, cityId.slug]) }}" method="get">
|
<form action="{{ url_route('adv_list_seo', [catId.slug, cityId.slug]) }}" method="get">
|
||||||
{% else %}
|
{% endset %}
|
||||||
<form action="{{ url_route('visiosoft.module.advs::list') }}" method="get">
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
{{ formHtml }}
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<input type="hidden" name="cat" value="{{ app.request.get('cat') }}">
|
<input type="hidden" name="cat" value="{{ app.request.get('cat') }}">
|
||||||
<input type="hidden" name="user" value="{{ app.request.get('user') }}">
|
<input type="hidden" name="user" value="{{ app.request.get('user') }}">
|
||||||
|
|||||||
@ -164,6 +164,7 @@ class AdvsController extends PublicController
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Search by city slug
|
// Search by city slug
|
||||||
|
if ($category) {
|
||||||
if (is_null($city) && isset($param['city'][0]) && !empty($param['city'][0]) && strpos($param['city'][0], ',') === false) {
|
if (is_null($city) && isset($param['city'][0]) && !empty($param['city'][0]) && strpos($param['city'][0], ',') === false) {
|
||||||
$cityId = $this->cityRepository->find($param['city'][0]);
|
$cityId = $this->cityRepository->find($param['city'][0]);
|
||||||
return redirect($this->fullLink(
|
return redirect($this->fullLink(
|
||||||
@ -199,6 +200,8 @@ class AdvsController extends PublicController
|
|||||||
$param['city'] = [$cityId->id];
|
$param['city'] = [$cityId->id];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$isActiveCustomFields = $this->adv_model->is_enabled('customfields');
|
$isActiveCustomFields = $this->adv_model->is_enabled('customfields');
|
||||||
$advs = $this->adv_repository->searchAdvs('list', $param, $customParameters);
|
$advs = $this->adv_repository->searchAdvs('list', $param, $customParameters);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user