-2

could anyone tell me how to link a node/teaser to a view?

I have an overview page to give a list of all models available (done with view and one content type) and from there I want to send the visitor to the model page that shows not just that initial node but the entire view with gallery section etc.

Help would be so much appreciated, since I have been unable to find anything helpful on the web for days now.

Many thanks in advance. Susanne

1

Your description is a bit mixed up regarding the terms you use. Here's what I understand and how I would do it.

(1) You have a content type 'model' which is used to describe the individual model.

(2) You have a second content type 'gallery' which shows images or whatever other information. This content type also has entity_reference field linking this content to a model.

(3) You have a view displayed as block which lists full content of galleries (content type) and uses a contextual filter on the node id of the parent model content type.

(4) You set the block to be displayed in main content region and restrict it to model content types.

(5) You should now see all gallery sections when you visit a model node page.

(6) You create a second view which lists teasers of models, the titles link to the individual model pages (which already include the galleries block).

EDIT: After more information provided, I think you can achieve your goal way easier. Taxonomy Terms have built-in view (you may need to activate it in the views overview). Drupal displays terms as a link by default. Clicking that link you'll be taken to a page where all content for that term is listed. Now, in your existing view of all boats, add the taxonomy field "boat type/model" to your fields list and place it after/below the title. Configure the title field to NOT link to the entity and exclude it from display. Next, change the taxonomy field and rewrite it by using "[title]" as the rewritten content. Under display settings you can optionally set the field style to use some headline tag (e.g. h3). The result should be the title of each node linking to the taxonomy term view of that node's model.

4
  • Hi Paul, thanks very much for your response! Sorry, my description was probably not very good. I have actually done it via taxonomy terms. Content type 'boat details', content type 'gallery', both with the certain model as taxonomy term and then for each model a view set up filtering for a term each. So doing a second view with teasers could get me there? Cannot get the theory quite straight in my head. – subue Oct 6 '14 at 11:35
  • Yeah, this should work, too. For (3) use the view described but set the contextual filter to a taxonomy term derived from the currently displayed node. I assume, each boat only has ONE model taxonomy term? – Paul Oct 6 '14 at 11:42
  • Sorry, thought if I read up on contextual links it'll all get clear but not working so far. So I have a page via view for various taxonomy terms but one content type, giving me this overview of different models. I now want to link each node to a page showing all different nodes and consisting of different content types for the one taxonomy term this node already belongs to. Would your way described still achieve this? Where am I going wrong? – subue Oct 6 '14 at 21:23
  • First, I was talking about "Contextual Filters", not "Contextual Links" (both exist in the Drupal universe). Secondly, if you want all nodes for a taxonomy term, there's already a view for that built into Drupal. I'll update my answer. – Paul Oct 7 '14 at 11:56

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