mirror of
https://github.com/openclassify/openclassify.git
synced 2026-03-10 02:05:27 -05:00
parent category fixed
This commit is contained in:
parent
3227888502
commit
55a35422ad
@ -205,7 +205,12 @@ class AdvsController extends PublicController
|
||||
$this->template->set('meta_description', $seo_description);
|
||||
$this->template->set('meta_title', $seo_title);
|
||||
|
||||
$mainCats = $this->category_model->getParentCats($cat, 'category_ids');
|
||||
$mainCats = $this->category_model->getMains($cat);
|
||||
$current_cat = $this->category_model->getCat($cat);
|
||||
$mainCats[] = [
|
||||
'id' => $current_cat->id,
|
||||
'val' => $current_cat->name,
|
||||
];
|
||||
$subCats = $this->category_repository->getSubCatById($cat);
|
||||
} else {
|
||||
$cat = null;
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
{% if app.request.get('cat') %}
|
||||
{% for category_breadcrumbs in params.mainCats.first.getMains(app.request.get('cat')) %}
|
||||
{% for category_breadcrumbs in params.mainCats %}
|
||||
<li class="breadcrumb-item">
|
||||
<a href="{{ url_route('visiosoft.module.advs::list_cat', [category_breadcrumbs.id]) }}"
|
||||
class="text-dark font-weight-bold">{{ category_breadcrumbs.val }}
|
||||
<a href="{{ url_route('visiosoft.module.advs::list_cat', [category_breadcrumbs['id']]) }}"
|
||||
class="text-dark font-weight-bold">{{ category_breadcrumbs['val'] }}
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
|
||||
@ -13,14 +13,14 @@
|
||||
style="max-height: 300px;">
|
||||
<div class="list-group">
|
||||
{% for maincat in params.mainCats %}
|
||||
<a href="{% if(type == "list") %}{{ url_route('visiosoft.module.advs::list') }}{% else %}{{ url_route('advs_map_list') }}{% endif %}?cat={{ maincat.id }}"
|
||||
<a href="{% if(type == "list") %}{{ url_route('visiosoft.module.advs::list') }}{% else %}{{ url_route('advs_map_list') }}{% endif %}?cat={{ maincat['id'] }}"
|
||||
class="list-group-item list-group-item-action text-truncate">
|
||||
<i class="fas fa-dot-circle"></i>
|
||||
{{ maincat.name }}
|
||||
{{ maincat['val'] }}
|
||||
</a>
|
||||
{% for subcat in params.subCats %}
|
||||
<div class="list-group pl-3 bg-light">
|
||||
{% if subcat.parent_category_id == maincat.id %}
|
||||
{% if subcat.parent_category_id == maincat['id'] %}
|
||||
<a href="{% if(type == "list") %}{{ url_route('visiosoft.module.advs::list') }}{% else %}{{ url_route('advs_map_list') }}{% endif %}?cat={{ subcat.id }}"
|
||||
class="list-group-item list-group-item-action
|
||||
text-truncate">{{ subcat.name }}</a>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user