This project is read-only.

using a projection for a taxonomy result page

Topics: Customizing Orchard
Dec 5, 2013 at 6:26 AM
  • Is there a way to use a projection to show a taxonomy result page? I've not found anything on the web on how to do that yet.
  • How is everyone else doing this?
  • I would like to override the for loop that handles the projection since I want to create a product gallery of 3 columns using bootstrap rows and spans, Maybe someone can push me in the right direction?
I suppose I could manage to get it working if I could use a querystring parameter as a query parameter, so that I can make my navigation return the taxonomy Id, Or is it easy to handle this with a route? (productcategories/category1)
Dec 5, 2013 at 11:17 AM
Do you mean you want to project all terms of a certain taxonomy? If so, you can certainly create a Query and add a Content Type filter, specifying the term type to filter on.

To completely handle the rendering of the query results yourself, add the Shape layout to the Query (Layouts) and use that layout when rendering the projection.
Dec 5, 2013 at 12:11 PM
projecting the terms is not an issue, I've created a navigation that contain the terms I need, but when I click one of the terms I would like to be able to work with my own projection instead of the default projection that is loads the content for that term. For starters I would like to select another DisplayType for my term result. I know how to using projections, but I don't know where I need to change it for the default summary result of a term's items.
Dec 13, 2013 at 10:12 AM
anyone? :)
Dec 17, 2013 at 12:04 AM
Well, Sipke actually gave you a good answer. You would have to create a first projection for your navigation, and customize it so the links point to a second projection that has a parameter filter. That second projection can be customized to use the display type you want.
Dec 17, 2013 at 6:50 AM
Edited Dec 17, 2013 at 6:51 AM
Ah ok then I misunderstood it. So what does that mean exactly?

What I have
  • I have a taxonomy "ProductCategory" with 2 levels > level1 > level 2
  • I place level 1 terms in my navigation (check)
  • I place level 2 navigation on the left content zone (check)
  • projection page for products in the specified level 2 productcategory --> how do I add a parameter filter for my product projection? Should I just add the link to the projection as a custom field of my term and make a link out of it, or can I use a parameter from the querystring as a projection filter?
Dec 19, 2013 at 7:04 AM
Yes, you can use a querystring parameter as a projection filter.