Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
I have nubers of news all categorized. Now I want to display on front page (as a block) one News from each category. I created attachements for each category but as you know this is not the best solution.
I would like to set some dynamic filter, is it possilbe to do display one node per category wihtout creating view for each term?
Thanks,
Comments
Comment #1
dawehnerYou can add a taxonomy view and then add a "taxonomy term: representative node."
Take care that this is a quite advanced feature.
Comment #3
rolkos CreditAttribution: rolkos commentedThank you for your response, its working as I desire. But now I have another issue with that.
Now I have few content types that use same vocabulary. Is it possible to display just to one content type? Unfortunately as expected standard filter does not work in this case.
I was trying to use "Representative view" in "Taxonomy term: Representative node" but I'm getting error for ex.:
SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens
I tried to set view I'm using in "Representative view" as simple as it's possible to display all nodes of desired type in some other try I tried to get only "nid" field. Unfortunately I'm still getting this error.
How should look like correct "Representative view”? Should it contain just filed, what type of view it should be? Is it possible to use "Representative view" if I'm using Taxonomy term:Representative node?
Thank you.
Comment #4
dawehnerAlternative to represtantive view you can also use the views_field_view module, which allows you to do the same.
Comment #5
MustangGB CreditAttribution: MustangGB commentedClosing this as outdated, feel free to re-open if you're still looking for a solution and waiting for appropriate assistance.