This project is read-only.

Content organized to categories and subcategories

Topics: Core, Customizing Orchard, General
Jul 25, 2014 at 2:25 PM
Good day,

I am beginning with Orchard and looking for a correct way to implement the following. Website must have articles categorized either by categories and subcategories or even tree-like non-limited drill-down. I am googling over for good examples-tutorials but can't find any.

Do I understand correctly I need to create new content type for my article and add containable part. Then create new content type: category and add container to it. Same for subcategory.
What's the good way to output this on the front-end, is it projection, or this must be custom module?
Any useful resources which could help me here?

Thanks in advance.
Jul 25, 2014 at 4:54 PM
You should use Taxonomies for that purpose. This is exactly what they do.
Jul 26, 2014 at 1:28 PM
I found this very nice video which does exactly what I need.

But when I tried to implement how it is shown I could not find Taxonomy widget. I found a post saying that I must use a query and projections now. But whatever I do in my query I always receive single list, all items one by one while I need tree-like structure (exactly as in that video). Could you point me what do I miss, how can I build a tree from query results?
Jul 28, 2014 at 11:51 AM
I kind of found an answer myself. I crated a projection and in filter criteria I selected all content with my specific Taxonomy Group. I selected type of render to be Raw and received what I needed. Now I wonder is this correct approach, should I indeed use projections here even though I need only one content instance, my query always return 1 result and is not even expected to return more than 1 result?