Hi,
I would like to make a related nodes block next to a node-view-pane in the node-view panel override
All solutions here already shown I have tried without success. I have views 7.3, Panels 3.0
I have a taxonomy field: field_regional4_ta which is the termfield for village in my node.
I have lots of nodes in the same village and next to the active node, I would show a views-list with the other nodes in this same city.
1) I tried all issues with node-view block and Content: Has Taxonomy but no success
2) I tried all issues with node-view block and default argument, PHP code etc.. but also no success.
Can somebody share a node view-block which works with showing nodes related by the active node through a term?
Also can somebody share a working process of getting this done?
Thanks a lot in advance!
Greetings, Martijn
Comments
Comment #1
summit commentedHi, I tried this: http://drupal.org/node/1111384#comment-4501280 and I have some results.
But it looks like it shows all nodes instead of the one which only have field_regional4_ta the same...
I attach my view. Can may be somebody look at it?
The difference with the example: http://drupal.org/node/1111384#comment-4501280 is my field field_regional4_ta instead of field_tags.
But no go in my node-view panels, all nodes are shown, and not only the nodes which have the similar village as field_regional_4_ta attached.
I think it has to do with adding context. But I can't figure out how to add: %node:field-regional4-ta --> Plaats to the panel pane...
Thanks a lot in advance for your reply!
Greetings, Martijn
Comment #2
summit commentedHere is the export of my view (it is dutch):
Greetings, Martijn
Comment #3
summit commentedHi,
I got it fixed! It was indeed a context thing. Will describe tomorrow how.
greetings, Martijn
Comment #4
summit commentedHi, as promissed I would show my solution here.
VIEWS CONTENT PANE
First I build the view with VIEWS CONTENT PANE as shown in: http://drupal.org/node/1473622#comment-5707476
Important is that this view is shown on node-page, and therefore only the NID is direct accessible through the url.
The great thing of VIEWS CONTENT PANE is the attachment to the context, in which you can interface with PANELS.
I have two contextual filters:
CONTEXTUAL FILTERS
A) Content: Has Taxonomy ID. And WHEN THE FILTER VALUE IS NOT AVAILABLE Select DEFAULT VALUE PHP CODE As Explained in: http://drupal.org/node/1111384#comment-4501280 . Use your own FIELD instead of the one in the PHP Code.
In my case I have the field: field_regional4_ta which is my village term.
B) Content: NID. As explained here: http://drupal.org/node/1111384#comment-4501280
I have because I have two contextual filters, two content pane arguments:
ARGUMENT INPUT
A) FROM CONTEXT: TERM ID
B) FROM CONTEXT: CONTENT ID.
These 2 things are the important ones with views.
PANELS
Second I choose the node-view override panel and start from there.
Next to the already shown node-info, I would like to add my newly made content pane view
A) Add the correct context relation: Taxonomy from Content (on Content: Village
B) Select the Node VIEW by adding the VIEWS PANE: views build in step 1 by both contexts.
Thats it. This way I have a node-view panels pane filled with a views content pane which shows the other nodes which are in the same village as my current node.
Greetings, Martijn
Comment #5
summit commentedHi,
It also works without using php in the first contextual filter, see: http://drupal.org/node/65375#comment-4264226
Somehow on all pages I look the part of context is missing, hopefully because of this is this post valuable information for somebody.
Greetings, Martijn
Comment #6
nijk commented@Martijn: Thank you so much for your explanation - this problem was driving me around the bend until I followed your comments.
I also managed to get it working quite quickly without using the PHP code block once I'd realised that the "Load default filter from node page..." checkbox gives you more options to Limit terms by vocabulary.
It might be worth me clarifying for others that you need to set a relationship on your panel (Your Variant > Contexts) as "Taxonomy term from Node".
Comment #7
kars-t commentedDear fellow Drupal enthusiasts,
this issue is now lasting for a very long time in the issue queue and was unfortunately never solved. As Drupal is a open source project everyone is helping on voluntary basis. So that this is was not solved is nothing personal and means no harm. But perhaps no one had time to deal with this issue, maybe it is too complex or did not describe the problem comprehensibly.
But this issue is not the only one. There are thousands of issues on Drupal.org that have never been worked on or could not be processed. This means that we are building a wave that is unmanageable and just a problem for the Drupal project as a whole. Please help us keep the issue queue smaller and more manageable.
Please read again, "Making an issue report" and see if you can improve the issue. Test the problem with the current Core and modules. Maybe the problem doesn't exist anymore, is a duplicate or has even been solved within this issue but never closed.
Help can also be found for it on IRC and in the user groups.
In order to remove this issue, I have set this issue to "fixed".
If there is new information, please re-open the issue.
--
This issue was edited with the help of Issue Helper