Show entire category tree starting from root
Forum rules
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Show entire category tree starting from root
I have a problem with the category tree.
I have a bunch of nested categories like this:
Categories
|_ Root
|_ Category 1
|_ Category 2
|_ Category 2-1
|_ Category 2-2
|_ Category 2-3
[...]
|_ Category 3
[...]
If I set the tree startid to the id of Category 2, all subcategories of that category will be shown as expected.
However, if I set the startid to the Root category only the first subcategory (Category 1 ) will be shown.
What am I doing wrong?
I have a bunch of nested categories like this:
Categories
|_ Root
|_ Category 1
|_ Category 2
|_ Category 2-1
|_ Category 2-2
|_ Category 2-3
[...]
|_ Category 3
[...]
If I set the tree startid to the id of Category 2, all subcategories of that category will be shown as expected.
However, if I set the startid to the Root category only the first subcategory (Category 1 ) will be shown.
What am I doing wrong?
Re: Show entire category tree starting from root
Are all other first level categories activated (look at the status of each category in the admin backend)
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: Show entire category tree starting from root
Yes, status is set to enabled for all of them.
Re: Show entire category tree starting from root
I reimported my categories and now all of them are displayed. However now I am running into a new problem where as first level the root category is shown, so my menu will look like this
Root
|-- Category 1
|-- Category 2
|-- Category 3
If setting the startid to the id of the root category, the root category shouldn't be shown but instead all categories within root.
Root
|-- Category 1
|-- Category 2
|-- Category 3
If setting the startid to the id of the root category, the root category shouldn't be shown but instead all categories within root.
Re: Show entire category tree starting from root
To hide the root node, change your template from:
to
Code: Select all
'nodes' => [$this->treeCatalogTree],
Code: Select all
'nodes' => $this->treeCatalogTree->getChildren(),
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: Show entire category tree starting from root
Thanks, this will surely come in handy soon or later. For this current project it made more sense to use a DataProcessor to fetch the info from the mshop_catalog table. The category menu I was displaying needed to be accessible from anywhere on the page, not just from pages within /shop. So I wasn't able to use the catalog tree action because I would be missing the /shop part in my urls for other pages .