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

Help for integrating the Laravel package
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Ahmad
Posts: 72
Joined: 05 Jul 2017, 15:19

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

Post by Ahmad » 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?

User avatar
aimeos
Administrator
Posts: 7836
Joined: 01 Jan 1970, 00:00

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

Post by aimeos » 14 Sep 2020, 07:51

Just hide the root category using CSS
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

User avatar
parmonov98
Posts: 33
Joined: 24 Sep 2020, 12:12

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

Post by parmonov98 » 12 Oct 2020, 11:21

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

User avatar
aimeos
Administrator
Posts: 7836
Joined: 01 Jan 1970, 00:00

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

Post by aimeos » 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()],
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

User avatar
parmonov98
Posts: 33
Joined: 24 Sep 2020, 12:12

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

Post by parmonov98 » 12 Oct 2020, 12:29

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?

User avatar
aimeos
Administrator
Posts: 7836
Joined: 01 Jan 1970, 00:00

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

Post by aimeos » 13 Oct 2020, 06:48

You can find all methods of the catalog items here:
https://github.com/aimeos/aimeos-core/b ... andard.php
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply