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.
Related
I have a paragraph named "Car Slider" and a Content Typ "Cars".
The content type consists of different fields like name, make etc. as well as a "Tags" taxonomy reference.
The car slider paragraph consists of fields like headline, description, and a Views Reference to display cars in a slider.
Right now I have different view displays to display only cars with specific tags in the slider, but it sounds unnecessary to have tons of displays, instead I'd prefer to have a dropdown in the backend editor the praragraph where I select the relevant tags and the view filters results to only that tag.
I want to use this to display sliders consisting cars of different categories/tags.
I am aware of the Expose Filter option, but this exposes the filter to the frontend/end-user, but I want to expose it to the admin who decides which content slider to add to the page.
I couldn't find a way to achieve this so far. Can anyone tell me if this is possible and how to achieve this? Thank you!
I am using Drupal commerce, I have been wanting to create views for recently added products, actually that works (pretty easy) but when I want to add the field image, images didn't appear. I will try to illustrate my steps:
1) create new view, show: content; of: product display; sorted by: newest first.
2) add relationship (content: referenced products) then I required it.
what I did wrong!
thanks for any answer.
You have to add the image field from the referenced product (i.e the image field, using the relationship like "(Referenced Product) Image") in your view. In Drupal Commerce, image fields on products are usually product field and not product display field as they might change across products variations.
If you already add the image field, make sure you choose "Use relationship : Referenced product" in the image field settings, otherwise Views will keep looking for this field on the product display, not on the product itself.
I have a custom (i.e. View) menu based on taxonomy vocabulary, in wich each term has an image field.
So far, each term is displayed properly with its picture, but I want to know if it is possible to display only the Image field relative to currently active term, while maintaining label+link for the whole vocabulary. Result would be to have an illustrative picture in top of menu, changing according to which item is clicker.
Is there any way to do something like that directly inside the View configuration ?
With the use of contextual filter, you can display information for the term passed as argument/ in URL.
First take a look at my node setup here: http://imgur.com/a/DJdRw
The first image is my Subpage slider content type which accepts multiple images and will essentially be my slideshow.
Second image is the default page, but I added a node reference to the Subpage slider node. It allows you to associate a particular slideshow to a page.
The last image I was messing around with Views and Views Slideshow, but I don't know what I'm doing. I managed to get images displayed, but as you can see it displays the images of a long vertically. I set the Views slideshow and it creates a slide between multiple nodes and not the multiple images in ONE node.
Where do I go from here?
Thanks
To display a block with a slideshow of images (from a referenced node) when viewing a page
I have come up with a much easier ("duh" moment) way of doing this. I created the functionality on a fresh Drupal install. Assuming you have the following modules: CCK (w/ Node Reference enabled), Views, Views Slideshow, FileField, ImageField.
Create your content types (in this case: slider and using the core page type)
Add an imagefield to the slider content type (field should be named field_images)
Add a node reference field to the core page content type (field should be named field_slide_ref)
Edit the node reference field settings (can remove "Required" if you like)
Create a new view called slideshow
In the slideshow view:
Change Basic Settings->Style to "Slideshow"
Add the field "Content: images" (choose Format: Image at bottom, unless using ImageCache)
Add an argument of "Node: Nid" with the settings:
Add a "block" display
Enable your new block labeled "slideshow: Block" at example.com/admin/build/block
If configured correctly, when viewing a page with the _slide_ref_ field referencing a slider node, you should see the slideshow displayed in the block.
Old Solution...
To display a referenced slideshow inside the page node being viewed:
Download, install and enable the View Reference module
Create your content type with multiple images (Subpage slider) [Done]
Create a new "page" view in Views UI. Add the field Content: YOUR_IMAGEFIELD (from Subpage slider) important: don't group the images, under Basic Settings->Style choose "Slideshow" and add an Argument of Node: nid choosing Provide default argument->Node ID from URL as argument settings
Create a view reference field on your page content type where you want to see the slideshow and select the view(s) that can be referenced and in the "Arguments" fieldset check: Allow delimiter seperated values and click "Save field settings"
Now when you create a default page there will be a view reference field to select the view you want to use and an argument field where you can input the node id of the node with your images you want to show as a slideshow in your page.
THE QUICK SOLUTION: a really simple tweak which the Views Slideshow docs should put in lurid bold gothic writing:
If you want to slideshow multiple images from an image field of one node ** don't forget to untick the "Group multiple values" checkbox in the settings for your-view>Fields>your-image-field **
This outlines how to make a slideshow of images that are taken from one node. The main point here is that you have to make a block that has an argument of node id taken from the url. I used this to make a slideshow showing as a block in the main content area, but you can of course put the block anywhere.
Modules:
CCK
imagefield
views
views_slideshow OR jCarosel
Create your Content Type with an image field, allowing multiple values.
Create content with multiple images, distinct enough so that you can tell if the images are from one particular node or another node
Create a new view as a node.
Create a Block display
Give your block a name (under Block Settings, left column)
Filter as: published, as your Content Type and with the image field (important - see last step why).
Field: your image field.
Make sure to uncheck the 'Group multiple values' checkbox
Display as an image, or an imagecache preset. Whatever you like
Add an argument:
Node: NID
For 'Action to take if argument is not present', select 'Provide Default Argument'
Node ID from URL
Under 'Basic Settings' select
If using views_slideshow, select the Style to be: Slideshow (Single-frame).
Items to display: unlimited
Save your View
Go to your Blocks page (/admin/build/block) and place your newly created block into the main content area (or wherever you want it to be). If you need to set the visibility on the actual block itself (/admin/build/block) then go ahead but otherwise only nodes of the content type that has multiple images will show the slideshow of images, while other pages on your site will not. This is why it is important to set a specific filter and to use the argument.
Done!
Essentially, this does not work as a page but has to be a block. The slideshow will use the NID to see what images are in that node and create a slideshow of those only.
Should work the same in Drupal 7 but have not tested this.
The solution is to add as argument not the 'node id' but the 'slideref field' and provide default argument 'nid by url' and the slideshow by node will work.
You can use the Views Nivo Slider as well.
can I add a CCK image field to another CCK field ? I would like to add icons for each item i add. At the moment I can only write the description.
This would be very cool functionality!
You could do this with JQuery if you want to add an icon by file type. For example see http://www.webdesignerwall.com/tutorials/jquery-tutorials-for-designers/ tip #10.
If you want to be able to specify an icon per item added (so it could be a different icon for every added item) then how you do it depends on how you are displaying it.
So lets say each CCK field is being added to a particular node type and you have a view that lists those nodes then I'd recommend adding a CCK image field to the node (so that each node of the required type has the descriptively named CCK image field and the original CCK field) and then adding a custom template to the view that controls how the image and field are output relative to each other.
I was about to write an example of how to do that but thought I'd check if that describes your needs before I add unnecessary info to the response.... can you clarify what you're trying to do?
You can do this using CCK 3.0's multigroup functionality. Note that there is no stable release for this branch, but it seems to work fine for most use cases.
You would add an image field (icon) and a text field, into a multigroup, and then when adding a new node, instead of the traditional 'add another' button, there is a button to add another group of associated fields.