Questions tagged [views]

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

Filter by
Sorted by
Tagged with
0
votes
1answer
18 views

Alphabetically ordering vocabulary terms in a translated

I have 5 English-Italian terms in a views exposed filter: Academic | Accademico American Studies | Studi americani Medieval Studies | Studi medievali Music | Musica Reviews | Recensioni The English ...
0
votes
1answer
392 views

File viewer with search filter by category and sub categories Drupal 7

I want to create a site running locally(localhost) which views files that are uploaded by authorized user. Using search filter by category and sub categories, all ebooks that are included in that sub ...
1
vote
1answer
521 views

How to alter node body content through Views pre render hook?

I have build the view to display node title and node body also I have applied combined fields filter which searches the keyword in title and body and returns the results. While rendering the contents ...
0
votes
0answers
14 views

Use if condition in custom text field in view

Is there a way that we can use a condition in custom text field with the help a module in drupal 8 {% counter == 2 %} <img src="example.png"> {% endif %}
2
votes
0answers
11 views

How to disallow a view to display user's label (and some other fields?) when the user access is not allowed

I have created a very simple UserAccessControlHandler which return AccessResult::forbidden() is all cases: class MyUserAccessControlHandler extends UserAccessControlHandler { protected $...
1
vote
2answers
515 views

Domain Access: Edit admin/domain/content/ display settings, filters etc

I am using Drupal Commerce and Domain Access module and I wonder where I could be able to edit how page admin/domain/content is displayed. I would expect to find a View page which is utilised by this ...
1
vote
1answer
379 views

On View Rewrite Results I don't see additional options like Add Read More button when checked “Trim this field to a maximum length”

Can anyone help me? Because earlier this options were displayed when I checked "Trim this field to a maximum length". May be it depends on some settings? I can't upload image to show you what I mean. ...
1
vote
1answer
377 views

User reference and Views 3 and Panels 3

i have the follow installation: Drupal 7.12 Views 3 Panels 3 I have an content type with the follow fields: User name (textfield) Job Function (textfield) User reference (Reference Field) I filled ...
0
votes
2answers
740 views

Change can I programmatically change the format of a view?

How can I programmatically change the format of a view using hook_views_pre_render in Drupal 8 or some another method?
0
votes
1answer
462 views

Wrapping fields together in a Views Exposed Filter

I'm trying to insert divs (or any tag) in my exposed filter form with the purpose of grouping related fields together. I want to have something like this: <div class="my-group"> field one ...
3
votes
1answer
397 views

Some fields are not sorting properly in view

I'm trying to create a directory list in view. But some of the fields are not properly sorting. See the below image for my view configuration. And the output of the view. Update: Style setting ...
-1
votes
1answer
22 views

How do I get the taxonomy term name?

I added a taxonomy field inside a view. I need to show the term name on the page in a grouped way, like this. taxonomy term1 name title1 content1 title2 content2 taxonomy term2 name title1 ...
0
votes
0answers
25 views

Relative date filter views block is cached for anonymous users

Drupal 7.74, views 3.24 (latest) I have a view which uses a date field to filter and shows on: less than or equal to "now" I display the view in a block. With caching for anonymous enabled, (...
0
votes
1answer
476 views

Get file ID and path to use in View template

I am working in my Row style template (views-view-fields--MYVIEW--block-1.tpl.php). I need to get the file ID and path of an image. The image field is a multi field, so I need to get all of the images ...
0
votes
2answers
24 views

Display multiple timezone values from a single date/time entry

In Drupal 7 Views Date/Time field, is there a way to generate multiple timezone values from a single event date, with start and end values? For example, if an event is entered into the start/end Time ...
0
votes
1answer
422 views

Set node to flagged by default

I'm using flags on my site as a way of filtering content through views, when a user views a certain node content type, I have a rule setup which resets the value of my flag and sets it against that ...
3
votes
2answers
553 views

How to remove markup from file field

I have added a file field in views and when displaying it has some markup like this <div id="file-218" class="file file-image file-image-jpeg contextual-links-region"> <a href="#"> ...
-2
votes
1answer
408 views

multi contextual filters

i have three taxonomy voc for my products. they terms go above 1000 so i am using contextual filters sub category brand price i want to create contextual filter blocks for these taxonomy say u click ...
0
votes
1answer
421 views

How to use Views Page + Attachment to show parent and children nodes?

I have a site with a node type Lesson, which has a Category field that points to a taxonomy term. There is another node type Exercise which is a child to a Lesson node. I previously figured out how ...
2
votes
1answer
475 views

Is it possible to create a hierarchical exposed filter in views using the Data module?

I'm using Data module to adopt tables from the same DB as 'native' Drupal tables and Views module to present the data. I added two dropdown exposed filters with Selective filter module. It takes all ...
0
votes
2answers
650 views

hook_user_login not working

After user enter email and password. hook_user_login gets triggered and excute below code. I am placing code in "bootstap_business.theme" file like this function hook_user_login($account) { $email = ...
1
vote
2answers
427 views

How to display content in views with large 4-layer taxonomy term tree filter?

To describe my problem more accurately I'll give a simple example of my situation: I have a categorized content. There are 10 different categories like clothes, cars, lamps etc. Each of them have more ...
1
vote
2answers
467 views

Views : Use a custom template field even if it's excluded from display

In a Views, I have two field : Link field : With 1 to n links to display (excluded from display) Body field : Who use the previous link field (via rewrite output and token) I have created a custom ...
2
votes
1answer
4k views

Contextual filter on a path alias

I am trying to create a page view that will display content by Content:Title which is part of the node's URL. I have 3 content-types: Movies, Books, and TV Shows. Each content type has a path alias ...
0
votes
2answers
1k views

Perform bulk operations on a custom database table

I have a custom database table. I implemented hook_views_data() to make it available with views. /** * Implements hook_views_data(). */ function uploader_views_data() { $data = array( 'texts' =&...
1
vote
1answer
549 views

how do I build a dynamic URL in views?

I am using drupal 7, have a content type and two taxonomy categories, size and shape. Im trying to build a dynamic url such as mysite.com/node/nid/tid/tid, which would get rewrote as e.g mysite.com/...
0
votes
2answers
792 views

Grouping Exposed Filters

I am working with the module Better Exposed Filters (BEF) within my view. I have about 12 exposed filters, some of theme are select lists and some are range sliders. Some filters thematically belong ...
1
vote
1answer
487 views

Create a View of Books

I'm using the core Book module for organizing meeting notes and documentation. How do I create a list of books with the views module? That is, I'd like a list of only the top-level Books, not all the ...
0
votes
1answer
527 views

The condition for the 2 fields sort criteria

the problem is this. I have the representation of 2 fields ordered by 1. Discount - open for all users 2. weight I need to sort was originally on 2 field - weight and if one is already busy 1 field - ...
3
votes
1answer
9k views

Alter views results in a hook

When I use contextual filters in a view, I can select an option to display a summary when the argument is not present. If I do it, it shows a list of node IDs instead of titles. For example, I get the ...
0
votes
1answer
405 views

Endpoint services with url alias name

Is it possible the to view xml/json format data with url alias name instead of endpoint_path/node/1 or endpoint_path/node/2
2
votes
1answer
127 views

Hide block on 404 (not found) page

SITUATION: A View page displays all "items" that have a certain "code". The code is passed via a contextual filter, e.g. /items/17, where 17 is the code. A user might try to ...
0
votes
1answer
434 views

How to use subquery in views where clause

In my project user can created by profile2 module. When user is created i am assigning some role,initially user is block state. I have another user role ie.user app rover who can approved these user ...
0
votes
1answer
449 views

Accordion display for views inside panel

I have a panel page which contains 2 views. I only want 1 view to display as an accordion. My problems are - If I set the style setting of the view to accordion - nothing happens. If I set the style ...
-1
votes
2answers
547 views

Group an aggregated view by date without time

I would like to create a view that uses aggregation on an entity to display the count and the sum by date. But it should be grouped by date only without time even the original date value has time ...
2
votes
1answer
588 views

How to create a link in my view of users to perform an operation like Active or Block?

I am using Views to create a view for user management, which looks like in the image below: How to create an "Active" or "Block" link in my view which performs an operation for the selected user like ...
0
votes
1answer
370 views

How do I count the number of Facebook likes in articles?

I am working on a Drupal 8 site. I added fblikebutton to my articles to enable users to like content. Is it possible to get the number of likes for each article as field? I am using the Views ...
0
votes
3answers
3k views

Views & JSON API

I can see Drupal 8 Views support REST Export. But not JSON API. So how to integrate Views with JSON API? https://www.drupal.org/project/jsonapi
0
votes
1answer
512 views

View displaying field collection items based on taxonomy term

I have a set of nodes that include a field collection item GeoImages. (Each node can contain multiple Geoimages, if that's relevant). Geoimages includes (among other fields) an Image and and Image ...
1
vote
1answer
19 views

With Commerce Product taxonomy term view, is there a way to have page title set to the translated term title?

The only way to have the taxonomy term name in the title of a taxonomy term Commerce Products view page I've found so far is the example view in the estore theme (I still don't get how tid which ...
0
votes
1answer
703 views

Accessing fields from view template

I have a block view which filters for a specifiy content-type. I'd like to fully style it myself and also write the html myself it outputs. So I went and created the file views-view-fields-header-...
4
votes
2answers
814 views

How do I remove JOIN in hook_views_query_alter()?

I have a view with two filters (A + B). Filter B should only be included in the query, if a specific value in filter A is set (like a "conditional filter"). So I tried to remove the where condition ...
7
votes
3answers
4k views

How to output plain URL to the node in Views?

I would like to output plain absolute URL of the node from Views as part of my XML feed (via Views Datasource). So far I have found the following field handler: Content: Link - Provide a simple ...
0
votes
1answer
611 views

Twig Tokens in Views not Rendering Inside an HTML Element

I'm using views to create a custom block of shortcut icons and need the images to link to the corresponding content. Using Rewrite Results I can overwrite the output of the view and have an anchor tag ...
0
votes
0answers
20 views

Add views (sum of a number field) into computed field

I have three field in a content type, date and category and amount. Based on amount field, I created a views to get total amount (aggregator views) by category as argument. So in this content type I ...
0
votes
1answer
463 views

What configuration is required to use date_views with a field?

I have a custom entity "referral" which is available for views: function mymodule_entity_info() { return array( 'referral' => array( 'label' => t('Referral'), 'controller ...
0
votes
0answers
26 views

Route to Url with contextual filters [duplicate]

I'm looking for a way to convert a route to an Url with contextual filters added. I can do it manually and it works, but I still think there should be a better, "Drupalish" way to do it. ...
0
votes
1answer
556 views

View not displayed for other roles

I have a block view that displays own articles created (this view is inside a panel page). But this view didn't displayed for other users except administrators, or when I check the permission 'Bypass ...
0
votes
2answers
550 views

How to hide nodes in a VIEW where the user is not referenced?

This is a follow-up to How to show nodes where the user is (not) in the reference field with Views? I have a node with multiple user references and need a node VIEW that hides all nodes where the ...
0
votes
1answer
445 views

Translate “Link text” in View

I have the following text/token in one of my field's "Link text" field. "Download [file:name]" How do I translate "Download" Here is a screenshot: https://www.dropbox.com/s/lwquchykaymh20j/...

1
2 3 4 5
295