문제

Say I had a site with travel destinations and I wanted to display a series of videos associated with each destination on a page below a description of the destination. The destinations and the videos each have their own node type.

Currently, the list of destinations is a view. Each video has a taxonomy term associated with it, that ties it to a particular destination. We use views arguments to pick up the taxonomy term from the URL and have the videos displayed in the side bar. However, we'd like to make it more clear that the videos are associated with a particular destination.

How can we best achieve the following layout?

+-----------------------------------------+
| +-------------------------------------+ |
| |                                     | |
| |               node 1                | |
| |                                     | |
| +-------------------------------------+ |
| +----------+ +----------+ +-----------+ |
| | video 1a | | video 1b | | video 1c  | |
| +----------+ +----------+ +-----------+ |
|                                         |
| +-------------------------------------+ |
| |                                     | |
| |               node 2                | |
| |                                     | |
| +-------------------------------------+ |
| +----------+ +----------+ +-----------+ |
| | video 2a | | video 2b | | video 2c  | |
| +----------+ +----------+ +-----------+ |
+-----------------------------------------+

p.s. - We're already using the Context module, if that helps at all (and consequently, we'd like to avoid installing Panels, since they serve similar purposes).

도움이 되었습니까?

해결책

A simple solution would be to use node reference on the destination node which reference video nodes. Then it's just a matter of theming to convert the node references (node ids) to videos.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 drupal.stackexchange
scroll top