mirror of
https://github.com/openclassify/openclassify.git
synced 2026-01-11 18:01:10 -06:00
#1811 SEO links in cats (remove default country & currency from url params)
This commit is contained in:
parent
dc90a96638
commit
c57a1b3518
@ -29,9 +29,9 @@
|
||||
<div class="col-md-4 py-1 px-0">
|
||||
<select name="currency" id="currency" class="form-control">
|
||||
{% for currency in active_currencies %}
|
||||
<option {% if app.request.get('currency') == currency %}
|
||||
selected
|
||||
{% endif %}value="{{ currency }}">{{ currency_symbol(currency) }}</option>
|
||||
<option {{ app.request.get('currency') == currency ? 'selected' }} value="{{ currency }}">
|
||||
{{ currency_symbol(currency) }}
|
||||
</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
@ -91,8 +91,10 @@ class AdvRepository extends EntryRepository implements AdvRepositoryInterface
|
||||
});
|
||||
}
|
||||
}
|
||||
if (!empty($param['country'])) {
|
||||
$query = $query->where('country_id', $param['country']);
|
||||
$country = isset($param['country']) ?
|
||||
$param['country'] : setting_value('visiosoft.module.location::default_country');
|
||||
if ($country) {
|
||||
$query = $query->where('country_id', $country);
|
||||
}
|
||||
if ($city) {
|
||||
$query = $query->where('city', $city->id);
|
||||
|
||||
@ -3,14 +3,21 @@
|
||||
<b>
|
||||
<span class="float-left">{{ trans('visiosoft.module.location::field.address.name') }}</span>
|
||||
</b>
|
||||
{% set country = setting_value('visiosoft.module.location::default_country') %}
|
||||
{% if app.request.get('country') %}
|
||||
{% set country = app.request.get('country') %}
|
||||
{% endif %}
|
||||
{% set defaultCountry = setting_value('visiosoft.module.location::default_country') %}
|
||||
{% set selectedCountry = app.request.get('country') %}
|
||||
<a href="#" class="a-sahibinden-type selected-country filter-country-btn float-right">
|
||||
<small>{{ getCountry(country).name }}</small>
|
||||
{% set countryValue = '' %}
|
||||
{% if selectedCountry %}
|
||||
{% set countryName = getCountry(selectedCountry).name %}
|
||||
{% set countryValue = defaultCountry == selectedCountry ? '' : selectedCountry %}
|
||||
{% elseif defaultCountry %}
|
||||
{% set countryName = getCountry(defaultCountry).name %}
|
||||
{% else %}
|
||||
{% set countryName = trans("visiosoft.module.location::field.country.name") %}
|
||||
{% endif %}
|
||||
<small>{{ countryName }}</small>
|
||||
</a>
|
||||
<input name="country" value="{{ country }}" type="hidden">
|
||||
<input name="country" value="{{ countryValue }}" type="hidden">
|
||||
</div>
|
||||
<div class="col-12 px-0 py-1">
|
||||
<button type="button" class="btn btn-default border border-1 w-100 filter-city-btn" data-toggle="modal"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user