0

In drupal 7 I have news posts grouped by the value of certain fields, I can filter them and display correctly the latest # news per category in a tabbed view: one tab per category. I also have another tab, which should collect the last news item from each category and I'm struggling to do it right.

I tried the nested views approach but despite creating a new template and new "helper" views with which I had hoped to strip all unnecessary tags, many tags are still created, breaking the layout (not really BREAKING, but it's not as it should). Could someone suggest a way to strip the tags or (better!) to do this in one go?

I'm not a php/drupal dev but if assisted I can understand code.

Update:

I have narrowed down my problem to the fact that all items are rendered in one single row by the external view. This breaks the layout because there's no </li><li...> between them. Instead, they are wrapped by divs. I have worked on this but I don't know how to make them appear on separate rows and it seems all the remaining wrapping is created by the last print $row in the chain. Can I change the behavior of the print or make the view display each field on a separate row?

0

In the end the Semantic Views module helped me achieve what I wanted to do.

I specified that rows had no tag and fields instead were <li>, I had to modify the template too, for consistency and theming reasons to reproduce the original layout of a normal view.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.