Questions tagged [views]

The Views module allows creating lists of content with a flexible query builder.

Filter by
Sorted by
Tagged with
0
votes
0answers
2 views

How to give access permissions to custom text field plugin in views drupal 8

I want to give access permissions to custom text field handler in views to display the field based on the user permissions. This is my custom view field handler referred to: https://www.webomelette....
0
votes
0answers
3 views

How to customize node view

I have this node view for my custom node. What I wanted to do is edit the files into button and the pictures into carousel. How can I manage that? Thank you
5
votes
5answers
3k views

Entity Reference: Filter by an entity reference view not working as expected

I am attempting to get a taxonomy reference field select widget that shows a list of taxonomy terms, including some extra data from their fields. I have attempted to use the "Reference method" = "...
2
votes
2answers
334 views

Views to display nodes based on ACL permission

I'm trying to use Flexiaccess with ACL to build a view based on node that the user has access granted by Flexiaccess. I found this on Drupal.org, it's the same use case, but is not working for me ...
1
vote
1answer
555 views

Display parent term based on child term in views

I have a vocabulary with the following structure: Vocabulary Parent term 1 Child term 1.1 Child term 1.1.1 Child term 1.2 Child term 1.2.1 Parent term 2 Child term 2.1 ...
1
vote
1answer
34 views
+50

Custom node access control not working with access filter?

In some of mine content types I have checkbox field "Content protect". If checked that node should be visible only to registered user. If not checked - visible to everyone: function hook_node_access($...
1
vote
4answers
672 views

How to create a view to display event registrants?

I'm having troubles setting up a View that displays a list of registrants (not registrations!) for a particular event. I don't know how to setup RELATIONSHIPS correctly? (I have already created a ...
0
votes
2answers
341 views

Relationships Between Nodes on Field

I'm trying to work with some information out of our enterprise system to create an employee directory, and I have a question regarding how I can relate nodes together. I have a content type called ...
0
votes
1answer
367 views

add Solr search box in views filter

I have succesfully installed solr and it is working fine, but my main search in my drupal site is based on views exposed filters, is there a way to add the solr search in views filters, so it ...
0
votes
0answers
9 views

How can we show up active filter values in exposed filters?

I have a requirement to show up selected filter values from views exposed filter. For ex: When I select OptionA from filter-1(select list) and OptionB from filter-2(select list), Results will get ...
0
votes
1answer
453 views

Preview is not showing after upload

When i am trying to upload image as a Authenticate user, After upload i am not able to see preview. fields got disappear fully. If i try to do as a admin, i am able to see that. Any suggestions?
0
votes
2answers
329 views

Vertical alignment of table content in a view

I have a table view with two columns, one of which contains an image which is quite high. The text in the second column is relatively brief but is displaying in the vertical centre of its cell (where ...
0
votes
0answers
17 views

How to get block relationships in a Views content type? (3 references in a Views)

As part of a migration from drupal 7 to drupal 8, I currently have a rather original node display method that I'm trying to reproduce to Drupal 8, but without success. Currently on Drupal 7, this ...
-2
votes
0answers
25 views

Toggle button to switch between roles

I am working on a site where there are 2 roles. creator Approver A person approved to Creator role will be seeing only that content. Similarly a person who is having approver role will only see ...
0
votes
0answers
15 views

When the view has no result with the paragraphs, there is an error

I created a view to display a block on my store page. But my page displays an error when the view has no result. If the view has a result, it works. What's the problem ? When I go to my store page, I ...
-1
votes
1answer
10 views

How to make a listing page of contents without using UI

I'm currently trying to make a Drupal 8 site that will show a list of actors with their image, description, and rating. I have already done so using the drupal UI itself but I want to achieve the same ...
0
votes
0answers
21 views

How to hide body field in a view only on certain content types

I have a search result view of different content types, and i want to show the body field (trimmed) on some content types, but show no body on other content types. Since they all share the same body ...
1
vote
1answer
351 views

Drupal Views Sorting problem

I have a question on views sorting. I have two content type(TypeA TypeB) which has the same field. And i use views to list all the content with the sort i want. Right now my problem is i want to ...
0
votes
0answers
18 views

Twig alter replacement patterns / rewrite results views field

I have some text I'd like to alter in the custom output of a views field. For example, if the output contains the word "pancakes" I'd like to replace it with "waffles". {{ field_recipe_prep__value ...
-2
votes
0answers
11 views

Using if else statement in Views “FILTER CRITERIA”

I added a field "isFirst" type Boolean to content type "Publication". I create a block that display just the latest one publication that its field (isFirst == true). I want that the block display the ...
2
votes
3answers
692 views

How to show reset button in a view only when filter is applied?

I have created a view with four exposed filters. In exposed form settings, I added a reset link and used auto submit option. Filter and reset works fine without error, but I want to show the reset ...
0
votes
0answers
13 views

Group paragraph fields in Views

I've added the paragraphs field as a relationship and managed to add my fields to the view but I can't seem to group them together. As a result the node entity is being spit out twice. Is it possible ...
0
votes
1answer
373 views

Views archive page showing year and months of article content type

I am trying to build a view page that shows archives (content type is article) only by dates: year (e.g.2016) february (post count) june (post count) etc .. year (e.g. 2017) march (post count) june (...
0
votes
1answer
16 views

How to get replacement pattern for Search API's fulltext search in global text area header

In Drupal 7, I'm currently using the default core search, and a view for node search results. I have a global text to pull in the replacement pattern for the term that were searched for. I get the ...
0
votes
1answer
339 views

How to show number of a views return results without submitting the view?

I have a view with some exposed filters.When selecting first exposed filter,I want to appear the Number of the view results without having submitting the view.Same thing for second exposed filter etc. ...
2
votes
1answer
430 views

Views CSV export, not exporting complete data

I have one CCK field called "Questions" with type "Long text". I'm trying to export this value using views data export in CSV format. Below is the text to export. Some text, trying to export. ...
-2
votes
0answers
13 views

Show a list of tagged node based on entity reference field [duplicate]

Drupal 7 Taxonomy vocabulary = Company activity (Activity 1, Activity 2, Activity 3 ….). This vocabulary has an OG group field. Content type 1 = Company with an entity (terms) reference field ...
0
votes
0answers
13 views

How do I set granularity to an END date value used as sort criteria?

I have a Date field with start and end dates (mm-dd-yy). I need to build a View listing nodes grouped by end date year and sorted first by descending end date year and second by ascending title. ...
1
vote
1answer
456 views

Get field from another content type in Views

I have two content types, 'user' content type where I have some info about user and then 'post' content type. Now I have a view that gets all 'posts' and shows them correctly but I would need to get ...
0
votes
1answer
19 views

Programatically change exposed filter value based on another exposed filter

I have 2 exposed filters in my Drupal 8 view - both are select dropdowns. I want the value of the 2nd filter to change based on selection of first filter Here are the filters $filters = $view->...
0
votes
1answer
30 views

Programmatically creating a custom block

I followed the steps from https://www.webwash.net/programmatically-create-block-drupal-8/. I have a view already created and I want to render this view in this block. I can't find a good ...
3
votes
1answer
533 views

Two displays with an exposed filter

I have a view using one exposed form in a block with a couple exposed filters. I would like the same result set to be used in two displays that have a slightly different format. One of my exposed ...
1
vote
1answer
1k views

Creating a “Related pages” view which also excludes the current node in Drupal 7

I want to create a view-block of related articles. The base for distinction is a given vocabulary. The node which serves as base to such related content list should be excluded from the list. I ...
3
votes
1answer
406 views

How to fallback to default language when listing nodes in a view if no translation is available

I have a list of projects, mostly in english, but some are translated in French. When i visit the French version of my website, how can I list all projects that are translated in French and if no ...
0
votes
1answer
356 views

Add cardinality_unlimited taxonomy reference to custom entity

Okay, so I'm getting an error that I think may be a Views bug, but I don't have enough knowledge about Views & SQL right now to be sure about that. Here's the hook I'm using to install the new ...
0
votes
1answer
439 views

Limit row items to 1 as per the GROUP BY result in Views 3.x

I'm trying to limit row items to 1 as per the GROUP BY result in Views 3.x, below is the view which I've created but I'm missing the key part from that, below is the exported code of my view. $view = ...
1
vote
1answer
484 views

Adding two contextual filters (Content : nid)

I want to display two type of contents : News and Events. So I added them in the filters criteria. This works great. Now I want them to be further filtered on the basis of the category the News and ...
0
votes
1answer
419 views

Creating some views fields for a taxonomy menu with the active trail CSS classes?

I have a taxonomy vocabulary which I want to use to create some navigation on my site. Terms: Weather Clothes Calendar Sports I want to be able to pull these terms and put them in the navigation ...
1
vote
2answers
393 views

Display a block based on the term reference field of the current node

What I'm trying trying to do sounds fairly simple, but I can't get my head around it. I'm having 2 taxonomy vocabularies: machinery and batteries (both created with NAT for all that matters), and 2 ...
0
votes
1answer
11 views

Hiding view filter option based on another filter selection

I have a view with search criteria and the search criteria looks like below: Age group(options: new born, toddler, pre-school) Classroom (options: NA, potty-trained, transition, not-trained) All ...
-1
votes
0answers
23 views

How to load a JavaScript function during view load?

I have a view called 'Programs search'. I want to disable certain fields based on javascript function during the page load. I already have a custom.js script created. Not sure what should be the ...
-1
votes
0answers
14 views

Select several pdf anywhere on website to add to cart and download them all by providing email [closed]

I use drupal 8. I have been searching all over the internet for a solution, but I cannot find any. This is my last resort before quitting on drupal and trying another CMS. I have a website (not an e-...
0
votes
1answer
442 views

How do I get total webform submission count of multiple webforms?

I am able to get the webform submission count total for single webforms, but when I filter for multiple webforms (using the OR operator) it only shows the total count for 1 of the webforms. How can I ...
1
vote
1answer
401 views

Views: attachment inherits exposed filters when set to No

I created a page with an attachment to it. Its a Glossary for the Username. And here is my attachment setting: i Have exposed filters on the page where it is attached to: And the Filters works ...
2
votes
2answers
2k views

How to expose paging data in REST export views

How to allow views to export paging data along with entities? I can set pager, and it works of course, for example my_view?page=1 displays something like [ {...}, {...} ] but I only get list ...
3
votes
2answers
2k views

How do I remove <div class=“views-element-container form-group”> from output?

I'm trying to theme the output of a Drupal 8 view to use via a token for email recipients of a YAML form. I'm on the latest Drupal 8 core release and using a Bootstrap subtheme. I have successfully ...
0
votes
1answer
351 views

Remove the language prefix from the file URL

We have a multilingual site on Drupal 6. which seems to work fine, we created a rotor view on the default language (en). This views looks great on default language which loads without any language ...
0
votes
2answers
3k views

Views filter criteria date field is greater than current date

I have a overview page with different events. Now it shows all events which were created. But I will that it just shows all the future events. The content type has a datefield for the eventdate. I ...
1
vote
3answers
381 views

Views Group By: Add a “footer” to each group?

I'd like to build a custom "add more" link under each group by in views. I'd also need the nid of the group by field as a token. Is this possible? Thanks.
1
vote
1answer
21 views

Views alter changes next row instead of current one

I have a view that is showing event content types. Users can apply for these events. I am using a hook to alter the 'view applicants' so I can show how many applications already excist. The ...

1
2 3 4 5
291