Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [views]

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

2
votes
1answer
33 views

HTML tags in views field label. Is it possible?

By default in views field label it possible to put only plain text, so the markup looks like: <div class="views-field views-field-price"> <span class="views-label views-label-price">...
-5
votes
1answer
49 views

How to refresh a view automatically?

I have a Drupal 8 site with NodeJS. I use the following module: https://www.drupal.org/project/private_message_nodejs For the installation, I followed the instructions in the documentation of the ...
0
votes
1answer
26 views

Exporting a custom module from one instance to another [closed]

I am new to Drupal. Currently I am using Drupal 7.4. Hhow to export a custom module from one instance to another instance? Note: copy the module to the new site didn't work.
0
votes
0answers
10 views

How to target specific alias or tid with views-view-responsive-grid template?

I have a template named views-view-responsive-grid--taxonomy-term--page.tpl.php in which I have added a custom block to the left of the responsive view grid with the help of my foundation grid, like ...
1
vote
2answers
39 views

How can I wrap HTML list in some div?

On my drupal 8 website I have created a view, with list of content. As an output format I have chosen HTML list. So currently it looks like following: <form id="views-form"> <div><...
0
votes
0answers
25 views

Details are going in multiple line should come in one line in excel sheet [closed]

I have a view in drupal 7.In that table view I have a field. In that field, I am using in REWRITE RESULT SECTION. but when I am trying to download excel of that table view, due to that description ...
-3
votes
1answer
36 views

Displaying Fields from current node in block [closed]

I want to show the current node fields in side bar block(As like Wikipedia shows the Image and details like name, address etc.). How can i do it, Please guide.
0
votes
0answers
17 views

View aggregation with user submission per day

I'm trying to get a REST export in view with the count of submissions (nodes created) by a specific user, per day. Something like: [{"date":"2019-01-20","count":"20"},{"date":"2019-01-18","count":"31"...
1
vote
0answers
36 views

Display content based on URL path

Creating a view block for a specific content type (for example, gallery) how can I filter it so that the view only shows gallery node that live under a certain path (for example, /business/gallery/...
0
votes
0answers
32 views

How to use DS layout on page generated with views?

I have a site where products are shown in different categories using taxonomies. I then use a view that emulates Drupal core's handling of taxonomy/term to generate those pages. Now, in only one of ...
0
votes
1answer
20 views

How to create different Filter Criteria which works indipendently for every views (one is “For All” the other is “For this page”)

I will post down an image I edited to better help you understand what I'm asking for The reason is I've more than 50 different views that filters the same objects from a single content type based on ...
0
votes
0answers
26 views

Shorten link in views

I have a Drupal 8 website with Shorten producing short links to content. "Tokens" and "Record Shorten" module are installated as well. I've like then to build a view exposing a text like "Hey, ...
0
votes
1answer
57 views

How to get view name and display ID in template_preprocess_node function

I'm having some trouble in order to get a view's name and the display ID in a template_preprocess_node function. I have a custom content type and a view with two different displays. My idea is to ...
1
vote
5answers
97 views

Use Color Field Value in Views Field Template File

I have two fields in my view: field_background_colour and field_heading The are both being pulled from nodes and displayed in a rotating hero banner. Each node has a different colour and different ...
0
votes
2answers
49 views

How do I run hook_views_data_alter()?

So I have already read and followed everything I could find on that issue: putting my_module_views_data_alter(array &$data) in my_module.views.inc file in the root directory of my_module, ...
-1
votes
0answers
21 views

How do I programmatically alter a contextual filter for a block?

I create a view that shows all the news nodes. That content type has a Country field and every news is related to a country. The site is also using more than one language. When users change language, ...
0
votes
1answer
33 views

How to call field label & values in custom content type page template

I have created a custom page--mycontent-type.page.tpl for customizing display with html tags classes & attributes. I'am unable to call that content type fields & their label. I've tried these ...
0
votes
0answers
13 views

“Row Style Output” template file causes site navigation to break/disappear

I have the following in use in a view, to allow me to swap the order of fields/rows for every other row: <?php /** * @file * Using this template to swap ordering of view rows in view block. * ...
0
votes
1answer
14 views

User name in view arguments and title of page

I created a content type named "Post" and allowed certain roles to add posts on my website. I also created a view that displays these posts, as a page and block view. Now, I want to add a contextual ...
2
votes
0answers
15 views

View contextual filter not working inside Panels

I have a view with a contextual filter of type "Raw value from URL". This block view works fine in the page footer. But when added inside Panels & Page Manager, the view stops working. Hence it ...
0
votes
0answers
13 views

Views results + sort / keep order, order defined in a contextual filter

I have defined several NIDs, in a views and inside a contextual filter. The values are separated by a comma, and "accept several values" option is checked. But, If I display my view, the results haven'...
0
votes
0answers
13 views

Making a view that shows pages for multiple taxonomy vocabularies

In Drupal 8, I'm trying to figure out how to use contextual filters in Views to make the following view. I have two taxonomy vocabularies. Fruits Apples Oranges Grapes Info Where they were grown (...
0
votes
1answer
47 views

How can I create Change Password block?

We can create reset password block by \Drupal::formBuilder()->getForm('Drupal\user\Form\UserPasswordForm') in d8, but change password block \Drupal::formBuilder()->getForm('Drupal\user\Form\...
0
votes
1answer
20 views

How do I integrate a custom filter inside a view

I am using entity browser to view my uploaded images. And now I want to integrate a new filter to the view. My objective is to filter the images from the URI path. Currently view has a field in Filter ...
0
votes
1answer
10 views

Drupal 8 views slideshow not displaying images

Created a content type with title, body and slide(image) fields. Created a views block(format: bootstrap carousel, fields: slide) After I place the block in a region, I see the slideshow block but ...
1
vote
1answer
25 views

Views table columns not sortable

Standard drupal field types like Strings, Numbers, Dates and Taxonomies can be defined as Sortable in Views with Format: Table. But more complex fields like Hierachical Taxonomies and Paragraphs or ...
0
votes
0answers
9 views

View listing all product displays that reference inactive product variations only

I am trying to build a view which lists all product displays that reference inactive product variations only. So I built a view on product displays, set a reference to product variations and filtered ...
0
votes
1answer
22 views

How to alternate image on left/right using “Views Parity Row” module

This great tutorial explains everything except the CSS work. http://gogrow.org/tutorials/views_parity_row I need to add CSS class to each row so I can set left/right alignment accordingly in css ...
2
votes
3answers
150 views

Does an ajax callback work within a Views style plugin?

My module has a custom Views style plugin. In the style settings form, I want to implement an ajax callback, such as described here: https://www.drupal.org/docs/8/api/javascript-api/ajax-forms ...
-1
votes
1answer
32 views

How to place after each 5th item in a view a different content type?

I want to create a view with news which outputs another content type after every 5th result, in my case a newsletter subscription. How can I do this?
-1
votes
0answers
14 views

Drupal 7 Theme CSS js

my site upgrade drupal 7 to drupal 8 also install theme but CSS and js file not working . can you tell me how to embed CSS and js or any other solution ?
0
votes
0answers
30 views

Views block doesn't show up at the user profile page

I created a views block and try to make it appear on the user profile page. I did the following steps, but it doesn't show up: Block layout -> Place block Tab Pages: Select "Show for the listed pages ...
1
vote
1answer
13 views

Problem with Unorganized content on page

So I am not familiar with Drupal at all and need help. I am a graphic designer and trying to change the order of the layout on one of my pages. We had a developer design and organize our site but she ...
0
votes
1answer
9 views

How to deactivate keyboard navigation when using the “Views Slideshow: Swiper JS” module

So I am using the Views Slideshow (7.x-3.9) module in conjunction with the Views Slideshow: Swiper JS (7.x-4.0) under Drupal 7.61 and it’s working great for my needs. But have run into an issue. The ...
0
votes
0answers
13 views

How can I expose a multi-image field to the Views module such that different formatters can be used?

I'm building a custom query plugin for the Views module that uses JSON data from a web API, inspired by this article. I've created a series of field handlers that work fine. However, I'm struggling ...
0
votes
0answers
26 views

Formatting Paragraphs in json in my drupal powered REST API

I'm using Paragraphs to organise my content. A Project has many paragraphs. Each paragraph can be of type Text or Image (thanks to the paragraph type feature). I want to expose my content to a REST ...
0
votes
1answer
16 views

Help with view filters

I have a view using one content type: fee_schedule The view contains fields for species, keywords (hidden), and the title. The filters need to show ALL species except when searching by keywords. The ...
0
votes
2answers
17 views

Views Contextual Filter by taxonomy in field collection

I have a Drupal 7 project I'm working on that's got me stumped. I'm building a site where the node (Decals) are applicable to models and years (This decal is correct for this model of this year). ...
0
votes
0answers
13 views

Is it possible to create an Ubercart Orders view that includes line item details?

I would like to create a View of Ubercart Orders that includes details about the order itself -- collecting the various line items into a single column. Ultimately this will be used to generate a ...
-1
votes
1answer
21 views

How to Search Content in Views? [closed]

I have created a view to list all the contents I created. I need a search field in the view to search for contents. I tried the search module and when I search using one of the content names, it ...
1
vote
1answer
56 views

How to make exposed timestamp filter accept human readable date

I'm using Drupal 8. I created a new content type (title, body, image, date). The date is a timestamp field. I used the devel module and the Realistic Dummy Content module to generate a test content ...
1
vote
2answers
46 views

What's the best infrastructure to set permissions to user roles that controls who can see which Nodes and which Views?

I'm building a bsite that needs pretty stringent permissions. I have already created the (4) user roles for the site, but not sure the best way to handle viewing permissions. I see that when creating ...
4
votes
2answers
94 views

How can I show the user login block on the 403 page?

With D8, I have a node (content type: basic page) that I use as a custom 403 (access denied) page. I set this as the custom 403 page on: /admin/config/system/site-information. The path is /node/21, ...
0
votes
3answers
23 views

View listing related nodes by taxonomy term

I have a content type representing a book. Each book as a genre (SciFi, Fantasy, Thriller ...) and I would like to expose, on the page of a book some books sharing the same genre. I created a view ...
0
votes
0answers
17 views

How to token Insert nth element of Iframe?

Module used: Token Insert I have a content type with an iframe field which accepts multiple values. In my wysiwyg body field, I did a token insert. When I add this iframe field which has only one ...
0
votes
2answers
28 views

Show View When Empty and Hide View When Not Empty!

I have a webform as a block which sets a value connected to the logged in user. I want to display the webform if it hasn't been filled in yet by authenticated users, and hide it when it has (based on ...
0
votes
1answer
24 views

How do I create a folder structure inside a view

I have created a view to get the all images that I have used in the website. But it returns as a bulk list. But I have saved the images according to a folder structure. How do I get the images ...
0
votes
0answers
19 views

Custom Views Field Formatter for List - show all values and indicate selected/not selected

new Drupal user here so please forgive any rookie assumptions or questions I may have. I need to get all values (even those not selected) from a select list field in a view. I'm trying to create a ...
0
votes
1answer
43 views

Altering Views Exposed Form Elements and their Associated Labels

I have a series of Views Exposed Forms across a Drupal 8 website. My goal is to generate unique template suggestions so I can theme each individual input and their labels differently as needed. Here ...
0
votes
0answers
19 views

Field content not showing in public view

I didn't build the website, and I'm new to Drupal. I've been asked to add a new field to an existing content type. I've added the field, and it shows up on the form for that content type, but the ...