Displaying multiple fields on a "node reference field" - drupal

I've been struggling for a while with this problem and I'm curious if anyone has any thoughts:
I have two related content types on my website -- "Institutes" and "Projects". On a single Institute page I would like to display a preview of multiple Project content types that are related to that institute. This would mean for each preview pulling three fields from the Project page -- the main project picture, the title, and the project description.
Currently I have a "node reference" field on a Institute content type where you can select which Projects are related to the Person. Of course without Views it only shows the title of the Project. I just can't figure out how to use Views here to display the fields I want.
At this point I have a Block View with a Relationship selecting my node reference. I'm having trouble understanding how I can use that relationship to show fields of corresponding Project content types though.
Does anyone have any idea? I'm sure it's right in front of my face, I just need a push in the right direction.
Thank you so much in advance, to anyone willing to give advice.
-Maxime

Try this:
1) Create your view with the filter "Content Type: Projects" and configure the fields and display /style as usual...
2) Then add a argument of the "Institute reference field" or whatever you called on the Project page. Then set the default value of the argument to be "Node ID from URL"
When the block or whatever is displayed on a Institute page it will display the projects that reference it.
I hope I understood your question :)

I think you would have a user reference in your "Projects" content type instead of a node reference in "People" content type. Because you can create a view using arguments.
Try this things:
Delete the node reference in People.
Add a user reference content type in Proyecjs.
Create a view passing one argument: your user reference field.
Preview your view passing one example uid, i sure it workds.
I hope its useful.
Regards.

Related

How to create a field consisting of a list of all nodes

Good day.
There is a problem: display news block on specific pages of any type of material.
I see the solution as follows: Create a field in the type of material "News" which will be displayed all the nodes (Title) with the possibility of using the mark checkboxes.
Who could help with advice: is it the right direction, and if yes - how to realize this field?
Thanks in advance for any help.
Download and enable Entity API and Entity reference modules.
Then go to your content type "Manage fields" page (admin/structure/types/manage/[CONTENT_TYPE]/fields) and add a new field of type Node reference. The rest of the configuration is left for your liking.

How does one relate Boxes/Blocks to content types in Drupal 7?

Hi and thanks for any help given in advance. I'm looking to have boxes in drupal 7 to show up in a content type. Similar to Node References (https://drupal.org/project/references).
Can anyone point me to a module that may already exist or maybe if one does not exist, any advice on how to go about programming this feature?
Thanks again
Okay so I went a slightly different route.
Here are my steps.
I created a content type named "Sidebar Callouts"
I then went to the "Basic Page" content type (replace basic page with your own content type)
I added a field of field type "Entity Reference" with a widget of "Autocomplete"
In the field settings I set "number of values" to unlimited
While still in the field settings, I went to the Entity Selection area and I set mode to "simple" and selected the "Sidebar Callouts" content type that I created earlier
That's it. I now have a way to let the client choose a callout that is created as a node.
I wish I could have found a way to use Boxes but alas, project timelines did not allow me to look further into it.

Drupal custom content type is not displayed

I am building a website using drupal which allows users to create projects and then invite other users to join their projects.
I have created a content type- "project" for the main task. I can successfully edit this content type and publish it, however, when I get to the screen pictured here: http://imgur.com/t49pl the "view" tab is always empty. Any ideas?
what tulvit said, however...
I would recommend creating a View to display this content anyway. anything generated by the node is always difficult to present as you want, so to solve this issue, just create a View to output the content.

Drupal 7: Add view to content type

I've been making a template for a particular content type, but just ran into a problem: I need to embed a view into the content type.
I am aware this can be done via several different methods, but I don't see one that fits exactly my needs:
I need the view added automatically for all pages of that content type.
Using blocks in a region is not an option, as I want to avoid defining a region in the middle of a page that should only be available for a specific content type.
Translatable label.
Possibility to freely apply a template to all fields in the content type (excluding the embedded view).
I tried doing it via page layout (Panels) and simply adding node content fields and the view to my layout regions, but then I get another problem: I can't style my content fields without doing something that seems a bit over the top:
Currently I have about 20 different content fields in the content type that are wrapped in HTML and styled in my template file. I have a translated label for each of these in the template file. From what I can tell I'd have to add a template for each of the panes containing content fields to add my translated labels and HTML needed to style each field.
I'm not really fond of making 20 templates, 20 theme hook suggestions to get the templates to work and 20 regions in the panel layout just to get a view inserted in the content type.
Am I doing something terribly wrong here? Any suggestions?
You may want to try the Viewfield module or similar modules (search for "view field" or "view reference").
If you are doing something more complex like changing/filtering the view based on some value in your content type, then you may have to use Viewfield module in combination with something else that will help fill in the filter values.
I've never done something like this before so I'm not sure exactly what module combination would work but Rules or Computed Field come to mind as possible helpers.
You have to use "views node field" http://drupal.org/project/viewsnodefield, after installing this module you have to select the "Node content" in the display (like blocks,page). then click the add display. if you want to display the content like this page http://www.richtown.ae/?q=content/arabian-ranches then you have to download the views_galleriffic module and install it and choose the style option "Galleriffic Gallery". You can choose the content type by using the filter in the views.
That's it cheers
i implemented this in my website richtown.ae
if you still unclear please send me the email social#richtown.ae i will reply you & ready to help you we can share information
i am using this module in drupal 6.
I resorted to using the EVA module ( http://drupal.org/project/eva ).
In addition to Woodgnome's answer
Let's say you have a content type named 'Product'
You want to attach a view to it.
Here are the steps using the eva module :
On your view edit page :
Section Displays
+Add : Eva field
Section ENTITY CONTENT SETTINGS
Entity type:Node
Bundles:Product
That's it, going to a node product type will now display the view

Drupal create related node on node view

So if I have 2 custom content types book and review, I'd like a user(when viewing a specific book) to be able to create/attach a review to the book.
I've tried a few options.
1) Created a "create review" formblock and using panels made a custom node view panel for review, but I couldn't get the relationship to work.
2) I also tried overriding comments on the book type with the node type review, the problem with this is I'd like users to be also be able to comment on the book and I couldn't see the ability to add multiple comment types.
This seems pretty easy to do on node edit with node reference extension so I'm hoping this isn't a big ask.
You need nodereference and nodereference_url modules.
You can simply create a nodereference field in your review content type, and configure it with nodereference_url widget.
You partially answered your own question. With the nodereference module in D6 (or just references in D7), you can create a link in the same place 'add a comment' appears (the .links div) which says "add a review". This link is because "reviews" has a field called something like "book reference" which is a noderef field. This review will automatically fill in the field with the book where the user clicked the link and, depending on how you set the field up, send you back to the referenced node (book) or the new review.
You can find an interesting screencast there that show how to use Views Attach and Node Reference URL to do what you want :
http://mustardseedmedia.com/podcast/episode37

Resources