Drupal view error by using translator - drupal-7

i am using Drupal view which is filtering by node id when and that node are associated with other content type but when i use other language node id change and my view don not show the filtered items.

Related

Drupal 7: How do I use views to display information from the current node?

I have a Drupal 7 question. I would like to display certain pieces of information from my current node using a view.
I can use views to display information from other nodes easily by setting filters and other sorting features. That's no problem. However, I want to display information from the node which is currently opened. So, for example, if I'm on a page (node: 117, title: news), I can display all the images from that page, plus captions, by creating a view.
The logic, I suppose, would be to create a view with a filter (or contextual filter) stating that the node has to equal the current node, but I don't know how to do that.
Does anyone have any advice? How do I instruct a view to display information from the node which is currently open?
Thanks!
Edit the view
Add Content: Nid in contextual filter
In contextual filter options
WHEN THE FILTER VALUE IS NOT AVAILABLE
Select "Provide default value"
Type: Content ID from URL
Now the default argument will be the nid of the current node.

Drupal 7 unable to get referenced node in view

I have a node called "Student" I have another node called "Personal details".
I have made relations between them using entity reference module.
Now I am creating a view to get details of all students. I created a view of students and selected Content "Personal details" on fileds of the view. But I am only getting the id of the "Personal details".
I am struging to get the name and other fields of personal details node.
I used Relationships-> Entity Reference: Personal details and added content entityreference in fields but it is not displaying aything when i printing the view using get_view API.
Please help me on this.
I think this should work. Try to create a view for all types.
Select the fields that you want to display (the fields from students and personal info ). Chose to display both Id's from Student node and from the Personal info node, but make 1 of them invisible, to not be shown. ( you will understand why in step 4 ).
Add a filter, the Global: Fields comparison.
Select the two fields that have to be equal (the ID's).

Different icons for different nodes in extjs

I want to show the parent child relation using the tree in extjs 4. I have table which contains three fields: node_id, parent _id, and node_type. Here node_id and parent_id representing the child parent relationship. node_type is 9 digit code for node. Based on this 9 digit code, I want to show the icon of the node in tree.
There is no problem in generating the simple three with default icons for node and leaf.
But I need help implementing the different icons for node based on that node_type 9 digit code.
It should be enough to add an appropriate css class value to iconCls field of the tree record. Or just return iconCls from server as a part of json.
Use Saki's response if you have control over the server response and don't mind mixing the model and view domains. An alternative for keeping the view separated from the model is to use the Load event of TreeStore to map your node_type code to the corresponding css class iconCls on the node instance.

Is there a content type "root" default template in Drupal?

I've created a new content type, say "Products". Is there some kind of default routing and templating based on the content type ?
For example, can I access my "root" content type by going to www.example.com/products/ ?
And would I also simply need to edit a certain tpl for that content type "root" page (for example the /products/ page that lists all products ?
For now, the solution I've got is to create a node of type "Page" called "Products", create a view and assign this view to the Products page. Then, create a TPL for this node (wich would list the products).
I find this solution a bit long .. is there another way ?
Thanks!
I've created a new content type, say "Products". Is there some kind of
default routing and templating based on the content type ?
No, you can only edit (by core) the content type fields etc through the admin inderface.
For now, the solution I've got is to create a node of type "Page"
called "Products", create a view and assign this view to the Products
page. Then, create a TPL for this node (wich would list the products).
You can use Views module to create lists of data. Use tpl.php files (see the template suggestions) for the display of each page, node, block etc. I would suggest to not add a views inside a node tpl through code but as a block.
Did I understand well?

Creating a up reverse node reference list of a node in Drupal 7

What we are trying to do in Drupal 7: create a block that can be attached to a node view or taxonomy term view. In this block, a user can add links. These links can point to contacts, documents, links to other websites or taxonomy terms.
In the back-end, a user can select a contact, document or link. The user then gets a list of all nodes where this link is used. If the link is changed, it is updated in all the nodes where it is used.
In other words, a node reference that works in both directions, for multiple nodes. Any ideas are mightily appreciated :)
Hi have you tried to use Corresponding node references module? http://drupal.org/project/cnr
You can use:
http://drupal.org/project/content_dependency
It works for both node reference & entity reference modules automatically.

Resources