Page 1 of 1

how to don't show home category in catalog/filter?

Posted: 14 Sep 2020, 06:23
by Ahmad
i use aimeos/laravel 2020.07
i want to show categories in catalog/filter from next level after home, because the home level is useless (users can click on logo or another button to go home page/cagetory.
i want to show categories like:

Code: Select all

shoes
bags
shirts
instead of

Code: Select all

home
    shoes
    bags
    shirts
what can i do for this?

Re: how to don't show home category in catalog/filter?

Posted: 14 Sep 2020, 07:51
by aimeos
Just hide the root category using CSS

Re: how to don't show home category in catalog/filter?

Posted: 12 Oct 2020, 11:21
by parmonov98
Ahmad wrote: 14 Sep 2020, 06:23 i use aimeos/laravel 2020.07
i want to show categories in catalog/filter from next level after home, because the home level is useless (users can click on logo or another button to go home page/cagetory.
i want to show categories like:

Code: Select all

shoes
bags
shirts
instead of

Code: Select all

home
    shoes
    bags
    shirts
what can i do for this?
YOU CAN DO LIKE THIS TO GET RID OF ROOT CATEGORY: https://imgur.com/nn7sQPa

Re: how to don't show home category in catalog/filter?

Posted: 12 Oct 2020, 11:44
by aimeos
getName() is a really bad choice, you should use getCode() instead.

Alternatively, you can copy the tree-body.php template (https://github.com/aimeos/ai-client-htm ... rd.php#L75) and hand over the children directly:

Code: Select all

'nodes' => [$this->treeCatalogTree->getChildren()],

Re: how to don't show home category in catalog/filter?

Posted: 12 Oct 2020, 12:29
by parmonov98
aimeos wrote: 12 Oct 2020, 11:44 getName() is a really bad choice, you should use getCode() instead.

Alternatively, you can copy the tree-body.php template (https://github.com/aimeos/ai-client-htm ... rd.php#L75) and hand over the children directly:

Code: Select all

'nodes' => [$this->treeCatalogTree->getChildren()],
if you meant the situation when I change the language, yeah! you're right. I didn't get to the language point. that was a quick solution for me.
How do you find other methods? (getCode())

let's rephrase the question: How can we find them list of methods?

Re: how to don't show home category in catalog/filter?

Posted: 13 Oct 2020, 06:48
by aimeos
You can find all methods of the catalog items here:
https://github.com/aimeos/aimeos-core/b ... andard.php