Fix categories
This commit is contained in:
parent
61243f2298
commit
980288fca1
|
|
@ -1,5 +1,5 @@
|
|||
title = "category"
|
||||
url = "/category/:id/:category"
|
||||
url = "/category/:id"
|
||||
layout = "default"
|
||||
is_hidden = 0
|
||||
==
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
title = "main-category"
|
||||
url = "/main-category/:id/:category"
|
||||
url = "/main-category/:id"
|
||||
layout = "default"
|
||||
is_hidden = 0
|
||||
==
|
||||
|
|
@ -7,7 +7,6 @@ is_hidden = 0
|
|||
function onStart(){
|
||||
|
||||
$this['id'] = $this->param('id');
|
||||
// $this["category"] = $this->param('category');
|
||||
|
||||
if($this['id'] != 0){
|
||||
$this['top_category'] = Tps\Shops\Models\TopCategory::where("id", $this['id'])->get()->first();
|
||||
|
|
|
|||
|
|
@ -9,11 +9,11 @@
|
|||
{% for key, i in item %}
|
||||
{% for top_category in top_categories.slice(i.start,1) %}
|
||||
<div class="footer_col-group">
|
||||
<a href="{{ url('/') }}/main-category/{{top_category.id}}/{{top_category.name}}" class="footer_col-title">
|
||||
<a href="{{ url('/') }}/main-category/{{top_category.id}}" class="footer_col-title">
|
||||
{{top_category.name}}
|
||||
</a>
|
||||
{% for category in top_category.getCategories(i.limit) %}
|
||||
<a href="{{ url('/') }}/category/{{category.id}}/{{category.name}}" class="footer_col-link">{{category.name}}</a>
|
||||
<a href="{{ url('/') }}/category/{{category.id}}" class="footer_col-link">{{category.name}}</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
|
|
|||
|
|
@ -115,12 +115,12 @@ function onStart(){
|
|||
{% for key, i in item %}
|
||||
{% for top_category in top_categories.slice(i.start,1) %}
|
||||
<div class="menu_col-group">
|
||||
<a href="{{ url('/') }}/main-category/{{top_category.id}}/{{top_category.name}}" class="menu_col-title accord">
|
||||
<a href="{{ url('/') }}/main-category/{{top_category.id}}" class="menu_col-title accord">
|
||||
{{top_category.name}}
|
||||
</a>
|
||||
<div class="menu_col-box">
|
||||
{% for category in top_category.getCategories(i.limit) %}
|
||||
<a href="{{ url('/') }}/category/{{category.id}}/{{category.name}}" class="menu_col-link">{{category.name}}</a>
|
||||
<a href="{{ url('/') }}/category/{{category.id}}" class="menu_col-link">{{category.name}}</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue