Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I have really never had content nested more than two levels.
I have 3 Document Type Collections.
Basically I want to be able to have a certain URL path.
I created a page called Products and on it I display the possible categories.
When they select a product category I want it to show the possible SUB categories.
Finally I want them to select a sub category and then display all the product Items
I know this maybe a super silly question, but how do I create something like this? I basically want to preserve this URL structure so I am not using query strings.
You probably want to use actual nodes / subnodes for this as nested content is really meant to render content on one template and not generate URLs. Nested content is meant as a set of building blocks to render things on one page.
So you'd create a document type / template for each of these:
Product Sub Categories
And then create nested nodes in the content trees. There are lots of different ways to set that up but that's the most straight forward.
Thank you so much for the reply. I will give these suggestions a try
In the Umbraco back office you probably need 4 document types.
Then, on Products, go to Permissions tab when configuring your doc type and allow Product Category type to be created under it. Then on your Product Category, go to the Permissions tab and allow Product Sub Category to be created underneath it. Finally on the Product Sub Category allow the Product type to be created under it.
This will allow you the following creation in your content tree:
Sub Category A
Sub Category A
Sub Category A
Sub Category A
Which would have the url /products/category-a/sub-category-a/product-a
Which I believe is what you are after?
Hope that makes sense.
Thank you so much for the help!
this is right in case that you allow product to be only in one category, when you need product to be in multiple categories it should be managed in different way
My ten pence on this.
I've previously done this by using a "dummy product" node. This just has a picker to the actual product but sits in the secondary sub category and renders the product under this node path as well.
That way you can put a canonical on the dummy product which is under it's secondary (third / fourth...) paths back to the "original" so you're not displaying duplicate content but still have this product surface in searches / lists in multiple places.
The editor just has to update descriptions and prices in one place still and it also allows the editors to see what products are where more visually IMHO - keeping the content tree rather than having a flatter structure with category pickers.
But - it always depends on the requirements of the customer - there's no definitive solution / answer and that's why we like Umbraco... right?
I've done this as well, it all depends on the use case :-D (infact I'm doing something very similar on a site right now as it happens)
Steve, yes there is so much flexibility and for a newbie that can be overwhelming at times. Thanks so much for you suggestions.
So Steve, if a product belongs in 3 sub categories, you have 2 "dummy" nodes and one "real" node in the most useful category? (Or 3 dummies and the real one as a child of "products"?)
Yes - your first example. For the particular shop I was doing the product naturally belonged in one category and they wanted it to appear in 1,2, 3 + others so they create the "master" product first and then add it to other categories with the "product link" doc type that just picks the master. I colour them differently (blue is a dummy, black is primary) so it's nice and obvious.
That way the dummies all have a canonical tag to /products/primarycategory/someproduct/
Rather than breaking the Umbraco model of the content tree reflecting the URL (ie. dumping products all in some content container elsewhere).
I find it much easier (and hope it's therefore easier for the Editors) to always "know" where a content node is based on it's URLs and keep from overriding this logic to a minimum but based on some of the solutions I inherit I'm possibly in the minority!
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted