Nov 11, 2013 at 2:49 AM
Edited Nov 11, 2013 at 2:50 AM
Looking for advice here. I recently posted a feature request about
Display Type customisation for Taxonomies
- which the consensus was to integrate it with Projections in a future version of Orchard. I think that's a fantastic idea, however it doesn't help me now, so alas I must find an alternative solution.
What I'm trying to do is when a specific Term is viewed, I would like to alter the Display Type of the Content Items. Currently the TermPartDriver sets the display type as Summary.
Currently I have arrived to two solutions for this, neither are particularly great (hence I'm here asking for help):
- Modify the Taxonomies module TermPartDriver to read in a setting (which I would need to create), to set the display type.
- Create an alternate in my theme overriding Parts.TermPart-MyTerm.cshtml and rebuild the shape for each content item.
Hopefully you can see the issues with either approach. @1 will fork the core. @2 will have the Driver building the shapes as a Summary display type, only to loop through again in the view to build my custom display type.
I am concerned about performance as the Term views will be the core of the website I'm building, with at least 20 items being loaded each time on a medium-traffic site.
Possibly there is some sort of "shape caching" that I'm unaware of which would mean option @2 is better - I don't know.
I look forward to your advice, thanks!