0

I am using Drupal 7 and i have the following problem:

I have

  • The content type: issue,

  • Two views (which select nodes from the content type issue) with each view appearing from a different menu link

  • Two menu blocks, each one of them appearing based on the view i have selected from the corresponding menu link

I want the titles of my view nodes to be links to the content of type issue. I want, by clicking on this title, one menu block (from the previous two) to be appearing based on the view I have clicked the title.

I can't solve this problem with two different aliases. Any ideas??

Examples: Here is the first case: enter image description here I have a view which lists Issues nodes and the activity block is appearing on the left. By clicking on the titles, i go one more level inside and i have this result: enter image description here Now, another view which lists the same Issues nodes,as above, exists in my site in a different point:enter image description here. With this view, the resources menu block is appearing on the left. By clicking the titles from this view, i want to go one more level inside (as above) and display the resources menu block and not the activity menu block, as in the first case.


Following the instructions with Contextual Filters as follows, I have the following results:By clicking on a title from the first view : enter image description here and by clicking on a title from the second view: enter image description here

As we can see, although the appropriate blocks appearing in each case, but i don't see the original content that includes each view node.

I thought that having two different url aliases for each view node the problem could be solved. But this couldn't be a solution, sine by testing this case if i click the title from any view, only the resources block is appearing. Apart from this, i want the URL aliases to be defined automatically and Pathauto module doesn't allow this functionality: for a content type to define two different patterns

Any other ideas please???

2
  • do you want the list of node titles in your view should be a link to its content itself right? – Pravin Ajaaz Nov 17 '14 at 11:32
  • yes, exactly this. – Aleka Seliniotaki Nov 17 '14 at 11:55
1

What if you rewrite the title field of your node results with HTML so that each title links to the view you have created? Your view already displays all nodes with category "issue".

Edit: To link your titles to the view, I assume that in your view fields you are able to see a filed that looks like "Content: Title (Title)". Click on the field and on the field edit for visit the section "Rewrite results" and check "Output this field as link". In the "Link path" field, fill in the path to your view. I think this will work

Now for your blocks you can configure them to appear only when your view is being displayed, e.g.

  1. Configure block
  2. Show block on specific pages:
  3. Check "Only the listed pages":
  4. In the field below enter "path_to_your_view/*"
4
  • How can i do each title to be linked to the view that i have created? This approach doesn't solve the problem – Aleka Seliniotaki Nov 17 '14 at 11:54
  • @Aleka Seliniotaki Check my edit to the previous answer – Yannis P. Nov 17 '14 at 12:13
  • @AlekaSeliniotaki It is a bit unclear from the way you put it. When you click on the title from the View-1 you want the specific node or the content type to be displayed? If you want the specific node then I suggest that you play with the Pathauto module – Yannis P. Nov 17 '14 at 12:26
  • Please see my example above. It will be more clear... – Aleka Seliniotaki Nov 17 '14 at 13:53
1

It is not proper to have two paths for same node

You better create two different views with both listing of node and Details page connected by Contextual filter

Let me describe it

In Existing View

  • Add content:nid field and exclude it from display
  • In your node title listing page edit the field title and create a link to it as follows

enter image description here

Create new View For Node Details Display

  • Now create another view with Format:Content

  • Add a contextual filter content:nid which you get from the URL and define this new path as activities/%

  • Repeat the same process for the other view too. So now you can get two different path to render your block

5
  • Yes, but if I was clicked this title from View-1 I want the menu-block-1 to be appearing and if i was clicked the same title from View-2, I want the menu-block-2 to be appearing. – Aleka Seliniotaki Nov 17 '14 at 12:04
  • Check my updated answer.. and let me know if you find it useful – Pravin Ajaaz Nov 17 '14 at 14:16
  • I have two different views. Could you give me please more details about ".... Details page connected by Contextual filter". I don't understand what i have to do... – Aleka Seliniotaki Nov 17 '14 at 14:29
  • Updated it with details – Pravin Ajaaz Nov 17 '14 at 14:50
  • Please see my edits in the original question .. This was the result of the contextual filter approach – Aleka Seliniotaki Nov 18 '14 at 9:58

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.