Beside the parent category, I would like to recursively collect all of its child rows.
(Pseudo code) SELECT IDs FROM #_categories WHERE parent = father
As an alternative, SELECT IDs WHERE the first part of path is the parent's path
.
Is this correct? What will be the most efficient way?
Even better:
Is there a standard method (probably in ContentModelCategories
) to achieve what I need? Should I use ContentModelCategories::getItems(true)
? How do I invoke it, given I already have the "parent" category ID?
A working example will be really appreciated.