Drupal 7 how to add views - drupal

m create one vocabularity locations(like delhi,bangalore,kerala) and im creates two content types one for user content(fields name,locations,map) type another for admin content(fields like locatoins,no of atms) type , these two contain one specific field that is locations field (vocabularity) now i have to display all details in one view means as table . ,columns are locations,name,no of atms. how to display in these all details in one view please help me im new to drupal thanks in advance. already im creating view no of atms values not displayingenter image description here

First you need to create a new view to show content and type as all
In create page give display format as Table
Then click continue and edit
Add new filter criterea Content: Type
On add you can select your required content types Choose is one of option and check your required content types
Then click Apply
After that you can add your required fields from the add in fields section of your view.
you can add contextual filters for filter according to taxonomy name.

Related

Exposed views filter made of titles

I'm making a views slideshow of some images.
These images have a title.
I would like to expose this title as a drop-down list filter.
I'm able to do this with pr-configured filter values, but i want this list to be build by the values that the end users gives as a title to a image. (or made of another field like description etc...)
So, when a user uploads images with a title "vacation", i would like this value to come up in the exposed filter in the views slideshow...
Thank you
This can easily be done using the Views Reference Filter module.
Create a views page with the fields you wish to display.
Add an Entity Reference display to your view.
Set which field should act as your search field in the format settings of the Entity Reference display (in this case Content: Title). Remove or exclude all other fields for this display only (override).
To your page display add a filter Content: Nid (entityreference filter) and expose it to visitors. Remember to select the correct view in the "View used to select the entities" drop down if you have more than one Entity Reference views.
Optional steps:
Enable Ajax for your view.
Set the exposed form style setting to auto submit.
If I were trying to accomplish this I would add a taxonomy vocabulary for these images, then I would add a field to the image content type referencing this vocabulary.
After that, I would use create a Rule that would react to saving a new image and add a new taxonomy term to that image that is the title entered.
You can then easily create a filter in views to filter off that taxonomy term and expose that as a dropdown. By doing this each image should have a taxonomy term attached to it that is the image's title. As images are added the taxonomy terms should appear in the dropdown.
Let me know if you need any additional guidance.

How to display different contents types(twitter, imges, blog etc.) in Viewslide show in Drupal?

I am trying to display different content types on Drupal as views slideshow, including twitter, images, and blogs. Currently they are all saved in a field (unlimited value fields). I am going to extract these values to nodes as views only accepts node type values. I am wondering what is the best way to do it? I am new to drupal and can think of following ideas:
1. Use one node type, and create a display mode for this node type with customized codes
2. A separate node type for different content types, and each node type with some display mode
3. A minipanel for each node type,is it possible to display it in view slideshow?
4. some code to get data directly from fields, and export to views?
5. Or I use Colorbox and completely forget about View Slideshow?
Please help. Thanks.
You must set all the content types you want to pull in the query in the "edit" form of the view. It is not possible using only the one-step setup, you must choose "continue & edit" and then add different content types to your slideshow view.

How to create dynamic pages in drupal?

I have contents in the following url:
mysite.com/project/node-id
But then i want the user to be directed to
mysite.com/entries/node-id when they click on entries link.
How do i achieve this? In the entries page i want to show a view which takes the node id from url and shows results accordingly.
The answer lies in using arguments with views. http://gotdrupal.com/videos/drupal-views-arguments .This video exactly represents what i had asked for ! using arguments in views we can create dynamic views of 'page' type display.
Create content type(Entries) by CCK
Use pathauto, to create desired urls for Entries content type(/entries/[nid]).
Then render this new content on project pages(Views, blocks, menus or etc)

limit drupal view to show only nodes created by user

I'm using drupal 7. I created a view for displaying nodes of a specific content type (e.g. products). When viewing the page, I want only those products displayed which were created by the user (currently shows all products).
I would like to do it without using a url filter so the url would be simply:
/myproducts
Use the filter "User: Current". If that doesn't work, try with a relationship
With the Advanced Help module you can see "Example to filter content by the current logged-in user": http:// yoursite /help/views/example-filter-by-current-user
And there said:
Creating the relationship
In order to have access to the author of the content, it is important to create a relationship between the current content type, and users.
Under Advanced in the right column, select add next to Relationships.
Select Content: Author and click on Add and configure relationships. Leave the settings as they are and click on Apply (all displays).
You now have access to the user data related to the content you are viewing.
Filtering the view
Now you need to filter the view to display only content authored by the current user. This >data is now available for the content because you have created the relationship in the step >above.
Next to Filter criteria click on add to add a new filter to your view.
Filter the list of fields by selecting User next to Filter at the top. You now have more >fields than before due to the relationship you created.
Select User: Current from the list and click on Add and configure filter criteria.
Since this field is only visible due to the relationship you created, author will already be selected under Relationship. This shows that the relationship you created is being used for the filter field.
Select Yes under Is the logged in user, and click on Apply (all displays).
If you have authored content of the type Blog Post, you should now see a list of those posts under the preview section at the bottom.
Saving & testing the view
Here's what I used to make it work.
Under relationships, add content:author
Under contextual relationship, add user: authentication name and relationship: author (or whatever you called your relationship).
And if you want to be even more sure, add to filter: user current and add relationship.

Changing order of fields in Drupal's content type

I am using Drigg on Drupal 6.17. Drigg has a content type called as "Scoop". I try to change the labels and order of fields. Normally, this is done in Content Management > Content Types > Manage Fields . But some fields that are shown in Create Content screen are not shown in Manage Fields screen.
The screenshot of Manage Fields is here:
The screenshot of Create Content view is here:
The first three fields (Submit the scoop as.., Scoop's URL, Scoop) in Create Content form are not shown in Manage Fields view.
I would like to ask the reason for this. They must be defined somewhere else. Where is it?
Manage fields is for editing CCK fields that you have added. Other fields from different modules often have a weight setting that you can change to move the field up and down, which you would get to from the main content type editing page.

Resources