質問編集履歴
2
ヘルプ
test
CHANGED
File without changes
|
test
CHANGED
@@ -8,7 +8,11 @@
|
|
8
8
|
|
9
9
|
これに組み合わせて
|
10
10
|
|
11
|
+
```php
|
12
|
+
|
11
|
-
|
13
|
+
<a href="{{ url('product_list') }}?category_id={{6}}"> 取り出した名前 </a>
|
14
|
+
|
15
|
+
```
|
12
16
|
|
13
17
|
とリンク付けをしていきたいです。
|
14
18
|
|
@@ -21,3 +25,91 @@
|
|
21
25
|
ごめんなさい。
|
22
26
|
|
23
27
|
バージョンは3.0.9です。
|
28
|
+
|
29
|
+
追記
|
30
|
+
|
31
|
+
---
|
32
|
+
|
33
|
+
わけがわからなくって、今こんな感じです、、、。
|
34
|
+
|
35
|
+
```php
|
36
|
+
|
37
|
+
$Categories = $app['eccube.repository.category']
|
38
|
+
|
39
|
+
->findBy(
|
40
|
+
|
41
|
+
array('Parent' => null),
|
42
|
+
|
43
|
+
array('rank' => 'DESC')
|
44
|
+
|
45
|
+
);
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
return $app->render('Block/category.twig', array(
|
50
|
+
|
51
|
+
'Categories' => $Categories,
|
52
|
+
|
53
|
+
));
|
54
|
+
|
55
|
+
|
56
|
+
|
57
|
+
{% for hoge in Category.ProductCategories %}
|
58
|
+
|
59
|
+
{{hoge.Product.name}}
|
60
|
+
|
61
|
+
{% endfor %}
|
62
|
+
|
63
|
+
{% macro tree(Category) %}
|
64
|
+
|
65
|
+
<li>
|
66
|
+
|
67
|
+
<a href="{{ url('product_list') }}?category_id={{ Category.id }}">
|
68
|
+
|
69
|
+
{{ Category.name }}
|
70
|
+
|
71
|
+
</a>
|
72
|
+
|
73
|
+
</li>
|
74
|
+
|
75
|
+
{% endmacro %}
|
76
|
+
|
77
|
+
<nav id="category" class="drawer_block pc">
|
78
|
+
|
79
|
+
<ul class="category-nav">
|
80
|
+
|
81
|
+
{% for Category in Categories %}
|
82
|
+
|
83
|
+
{{ _self.tree(Category) }}
|
84
|
+
|
85
|
+
{% endfor %}
|
86
|
+
|
87
|
+
<!-- カテゴリ-->
|
88
|
+
|
89
|
+
{% for Path in Category.3 %}
|
90
|
+
|
91
|
+
<li>
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
<a href="{{ url('product_list') }}?category_id={{ Category.id }}">
|
96
|
+
|
97
|
+
{% for hoge in Category.ProductCategories %}
|
98
|
+
|
99
|
+
{{hoge.Product.name}}
|
100
|
+
|
101
|
+
{% endfor %}
|
102
|
+
|
103
|
+
</a>
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
</li>
|
108
|
+
|
109
|
+
{% endfor %}
|
110
|
+
|
111
|
+
</ul> <!-- category-nav -->
|
112
|
+
|
113
|
+
</nav>
|
114
|
+
|
115
|
+
```
|
1
追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -11,3 +11,13 @@
|
|
11
11
|
```<a href="{{ url('product_list') }}?category_id={{6}}"> 取り出した名前 </a>```
|
12
12
|
|
13
13
|
とリンク付けをしていきたいです。
|
14
|
+
|
15
|
+
|
16
|
+
|
17
|
+
追記
|
18
|
+
|
19
|
+
---
|
20
|
+
|
21
|
+
ごめんなさい。
|
22
|
+
|
23
|
+
バージョンは3.0.9です。
|