Can't see custom CCK field in view - drupal-7

I created a content type a while ago, and a view to filter it. I just added a field to that content type. When I try to add a filter to the view, the field that I just created isn't in the list. If I create new content of that type, I can see the new field, but not from the view. I deleted and recreated the field, changing the type of field, and have cleared cache. I've also tried creating another view, and still can't see that field. I can see all other custom fields, though.

Is the field you added a taxonomy or node reference? You may need to add a relationship to the referenced entity in order to get it to show up under the view fields.
Click "Add" beside "Relationships", and see if the entity type you are referencing is in that list... add the reference, then go back to adding fields and see if it shows up in your list.

Related

2sxc Dnn.. Add existing content items to module

I have a view of entities which are being displayed based on an entity type filter. I now need to reorder these and would like to use the built in 2sxc functionality to do this, so I have a created a new view of the data using the "module data source" so that the ordering will work.
But how do I now make all of the existing entities of the same type (definition) appear in this new view? The view now displays one item by default and I can replace that one item. But how do I add multiple existing items? I need the Entity ID's to remain the same for Query String usage and SEO.
Thanks, hope the question makes sense.
Cheers
I believe that you are asking "how can I add many items to an instance (module) manually, so that I can also sort them manually" - is this correct?
If yes, then you must make sure your template supports lists (checkbox in the template settings). This then gives you a [+] button; but you don't want to use that, as it would be for typing in new data. There's another button called "add an empty demo entry" which you'll see as a round (+) after pressing the more ... button once. Pressing this will give you empty entries, into which you can then replace existing items.

display other fields of a entity reference field

Let's say I have a content type of "person", which contains details about that person. I have another content type of type "house", and I want to use an entity reference field to select different people, but when the content type is displayed I want not just the person's name (the title of the referenced node) but all the other details. I have tried selecting the View mode "Rendered entity", with view mode "full content", which I would expect to display all the fields - but I can't get it to work - it just displays the title.
Have you set up the full content display to display all fields?
Go into your person content type - go to custom display down in options.
Then up in the top right corner you should have default, teaser, and full content links.
Go into full content and make sure all fields are being displayed.

contextual filter views in drupal 7

I have a content type which has a Entity Reference field (field_industry). I am trying to create a menu on a page containing all the nodes which have an enity reference which is the same as the title or URL of the page the view will be displayed in.
EG
I have a page called glass, and 2 pages below which have the Entity reference of "Glass". I have created a view, which shows the title field. If i add a field to the view (field_industry) and set it to =glass. But it needs to be dynamic. How would i do this with "contextual filters"?
The entity reference field stores a reference to the actual node so you do not filter on the string glass you filter on the node id.
If my understanding is correct when you view the glass node you want to show a list of all nodes that reference the glass node.
Create a view showing content of the type you want to display, also create a block with that view.
Add a contextual filter on the field that is used to reference the material.
For "When the filter value is not available" check "provide default value" and then "type" should be "Content ID from URL"
Go to admin/structure/blocks and place the block where ever you need to display it.

ADF: List of Values Update Multiple Fields

I have an LOV added to my view object which updates 6 fields - done all through the LOV wizard in JDeveloper. It works perfectly fine when test running the application module - all fields update with the proper values after selecting a value from the LOV. However in my JSPX form, the only the field that gets updated is the one that the LOV is attached or is initiated on.
On my form, i only display 2 out of the 6 fields - the field which initiates the LOV and another editable field that the LOV is supposed to update. The part where this gets interesting is that the 4 other fields in my view object that i dont put in my form, are updated successfully by the LOV! But the one additional editable field that i left in my form, isnt updated.
Why is that?
I could just write a method in my View object Row Implementation class to update that editable field manually, but i feel like theres something more straight forward via declarative approach.
Thank you!
Fixed!
I needed to update two settings on my 2nd field of the form.
Removed the default bindings on the "Required" attribute and set it to "false".
Set "ShowRequired" to true
After that, I saved my changes and re-ran my application and the field updated properly!
I hope others find this helpful!

Drupal 7 Entity Reference and content type field display

I have successfully created an Entity Reference as one of my content type fields. I am using the Select List as my widget type. The content of the Select List defaults to the node title. This is problematic in my case and I would like to display different field content of that node. Anyone know how to do this?
When you create an entity reference field in the field settings you can specify that it uses an "entity reference view" to create the list of options.
So in Views, create a new view that outputs the field you want for the Entity type you want. Set the display type to be "Entity reference" (you may need to install the Entity Reference view Widget module)
then in the the field settings for your field set it to use that view.

Resources