Right, and the same for category.
It’s only the picture sorry! All the folders are public. The actual structure:
Right, and the same for category.
It’s only the picture sorry! All the folders are public. The actual structure:
What about my first question in the last post?
My answer is for both questions.
What do you get if you put
dump($products);
dump($categories);
into your controllers right after the variable definitions?
It goes to the else statement. After deleting it, a empty page appears …
Maybe the best way is to look at the my code?
How can it go the else statement if you put it into the controller? I said directly after the variable definitions. We are not getting anywhere at the moment.
Sorry my fault …
The result by clicking on a category:
Kirby\Cms\Pages Object
(
)
Kirby\Cms\Pages Object
(
[0] => shop/t-shirts/less-is-more
[1] => shop/t-shirts/papers
[2] => shop/t-shirts/gradient-01
)
on the shop site it seems to be right
Kirby\Cms\Pages Object
(
[0] => shop/t-shirts/less-is-more
[1] => shop/t-shirts/papers
[2] => shop/t-shirts/gradient
[3] => shop/pullover/forme-for-me
[4] => shop/pullover/point-of-origin
[5] => shop/pullover/line-nucleus
)
Kirby\Cms\Pages Object
(
[0] => shop/t-shirts
[1] => shop/pullover
)
Ok, so products is empty and $categories
returns the grandchildren if you have put the dumps in the order I suggested. So we are somehow on the wrong level.
I pasted it in the order you suggested. It seems to be really the wrong level
But which one is that other page where it is not correct? You cannot put the same code for different levels in your tree if that is what you are doing.