Query by taxonomy & multiple styles for projection widget

Topics: Customizing Orchard, Writing modules, Writing themes
Jun 12, 2012 at 7:44 AM
Edited Jun 13, 2012 at 10:51 AM

Hi, what i want to accomplish is

Create module with a News content type, part and a Top News widget that shows top 5 news from defined category and a filter news widget. I need to use multiple of these widgets on the title page (e.g. "Latest News from Africa", "Latest News from Europe" etc.) I need also that individual widgeds can have different appearance/style (e.g. Africa in yellow, US in blue... but maybe I need different HTML, not just CSS based on class from technical name).

I would like to use taxonomies module for all kind of categorisation in the system. So News.NewsType would be a taxonomy field.

The "Widget" would be a projection widget with query for "Africa", "Europe"....

1. Is this a good approach or am i missing something important?

2. Can i create the top news widget with the use of projection widget? How can i set different styles on multiple projection widgets on the same page (news from africa in yellow, news from europe in blue)? Is it possible to use different views for different "instances" of widget? Or customize generated HTML in any other way?

3. How to create the filter widget? (it shoud work like a projection with frontend filter - filter on NewsType taxonomy, publish date and on some other attributes....). Especially how to create the query to return NewsContentItems filtered by the taxonomy field, date etc.?

4. I want this to be a "out of the box" reusable module without the need of dashboard customisations.

I will be grateful for any advice or help you can provide.

Jun 14, 2012 at 6:46 PM

noone? or weren't my questions understandable? :(

Developer
Jun 14, 2012 at 8:35 PM

I think what you're suggesting is just fine - everything seems to be achievable using just Taxonomies and Projector. If you're able to set this up manually, you should be able to create a recipe and make it part of your module. If you need to know how to do that, just take the Vandelay Industries module as an example.