Skip to main content

Questions tagged [views]

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

Filter by
Sorted by
Tagged with
-2 votes
1 answer
49 views

How to add a comment box in a view so that users can comment on it just like it displays in node

I want to add a comment box in a view so that user can comment there also just like they do in specific node.
Mohit Bansal's user avatar
-2 votes
2 answers
627 views

How to create custom search filter using view

I am using ubercart module in site. I need to create search filter,that will be search product sku,title and description etc.
jsh's user avatar
  • 706
-2 votes
1 answer
136 views

How to check author role in Views PHP

I need to check author role using views php. I've already added a relationship and added a field(excluded from view) User: role. How can I check if author role is equal to 'administrator'?
Fabio's user avatar
  • 29
-2 votes
1 answer
80 views

Drupal Views Slideshow + Galleria

Image Gallery with the use of View slideshow does a trick for me. what I need : But for thumbnails & for main image galleria provide image crop with 4 options like height, width etc. Is there ...
sanjay's user avatar
  • 1
-2 votes
1 answer
124 views

Block print on page.tpl file

I have created a block for adding image from drupal backend with title name "image". Now i want to add this block into page.tpl. How can i do that by using code.
Vikas Rana's user avatar
-2 votes
2 answers
110 views

how to get logged in username in email body [closed]

<?php $to="[email protected]"; $headers = "From: no-reply@xyz\r\n" ."X-Mailer: php"; $message="Dear Xyz, i am ".i write a following code here to get current username."; $subject="Testing"; if (mail($to, ...
Swapnil0226's user avatar
-2 votes
1 answer
779 views

Disable download images colorbox popup [closed]

How can I disable "right click" in colorbox Popup so the visitor could not directly download images.
user2301868's user avatar
-2 votes
2 answers
52 views

Undefined index und error

I'm getting undefined index:und error. below is my code $photoItem = file_create_url($node->field_thumb_img[LANGUAGE_NONE][0]['uri']);
Bharath Basavaraju's user avatar
-2 votes
1 answer
413 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 ...
johny's user avatar
  • 15
-2 votes
1 answer
52 views

View not showing result based on taxonomy term contextual filter

I have a view and same in D7 and same I created in Drupal 10 but the output is not as expected. I found in Drupal 10 we don't have Filter Value type in Drupal 10 Below is the Drupal 7 view query: ...
Drupal's user avatar
  • 1
-2 votes
1 answer
268 views

Is it possible to add an Ajax action on a button define in a twig view template?

I have a view for which I customized the views-view-field...html.twig template. On each row, I added a first button A which opens a modal with two buttons: Button B to confirm the action and Button C ...
Benoit's user avatar
  • 65
-2 votes
2 answers
61 views

How to show a many-to-many relationship in drupal 7? Example: Teachers who guide a certain course

I would like someone to guide me regarding relationships. I have a many-to-many relationship (Course, Teacher) and I need to show the teachers that guide a certain course. What module or way is ...
Javi Agredo's user avatar
-3 votes
1 answer
118 views

I want to make a Drupal 8 view with contextual filter

I want to make an intelligent view and want to pass contextual filter. If the contextual filter value is passed in the url so only display the article having the id like http://example.com/article/2. ...
Fawad Ali's user avatar
-3 votes
2 answers
354 views

Some results in a view appear twice or more

On a multilingual site I have a view of all nodes with the following configuration: View type: Page Format: Table Fields: Content (title) Filter criteria: Published nodes Sort criteria: Publishing ...
jorno's user avatar
  • 43
-3 votes
1 answer
45 views

A complicated question about views, pls help~ [closed]

May I ask how to achieve this requirement? There is a task content type, which has an applicant field, which is multi-valued (that is, a task allows multiple people to apply at the same time), which ...
Major's user avatar
  • 1
-3 votes
1 answer
42 views

How to replace the default text of the home page, when it is empty? [closed]

On the Drupal 9 home page, there is a text displayed by default, when no content has been created. I want to modify the text of this page, when there is no result. I go to the "frontpage" ...
francky's user avatar
-3 votes
1 answer
18 views

Attached all images from taxonomy in view

I am creating a view of a content type and content type is linked with you to taxonomy with has images. Now, i have added Relaionship as well. But now if my node is attached to muliple taxmony term it ...
Aayush Bansal's user avatar
-3 votes
1 answer
129 views

Based on location How to change the banner image?

I am new to drupal 8 how to change banner image based on location. i created one content type in that two fileds i am added one is banner image and another one is location. while loading the page ...
example_D's user avatar
-3 votes
1 answer
211 views

How to trim title for mobile devices?

I am working with Drupal 8 website, on my view I have a list of contents. Some titles are pretty long, what is fine for teh desktop view, but for mobile version I need to trim the tite up to 30 ...
user avatar
-3 votes
1 answer
184 views

How to remove arrows from views Select list field [closed]

I have a content type which has a select list field. I created a view where select list field was added under "filter criteria". How can I remove the arrows and slider?
autop's user avatar
  • 565
-3 votes
2 answers
571 views

Shopping Cart view, change quantity widget to select box

I have two kinds of price type: price per unit and price per weight. I have managed to use hook_form_alter() to change the widget textbox to a predefined select list. For some items it fills the ...
J. Mi's user avatar
  • 31
-3 votes
1 answer
81 views

how i display price bar slide in view [closed]

i am a amateur in DRUPAL, i want CREATE a commercial page, i want display something like this in the PICTURE, what module i used ? AND WHAT is steps? because i can't FOUND any thing about this: I ...
zaferro's user avatar
  • 37
-3 votes
1 answer
651 views

How to print an image field in Views with PHP filter

I'm trying to display an image in Views using the PHP filter. If the value of a boolean field (field_primum) is TRUE, I want the image to display. The picture is available in $row->picture, but ...
natasha's user avatar
-3 votes
1 answer
69 views

Slideshow for images in one node [closed]

I am having an image field which takes unlimited number of images in the content type. now I need to create a slideshow (using views slideshow possibly) for those images in one node. any ideas how can ...
Ashkar A.Rahman's user avatar
-3 votes
1 answer
52 views

How do I access the login page?

I am using the Drupal UI to make changes to a site, and I want to update the page that a user sees when they are not logged in. Is that a view I need to create?
Madison Beatty's user avatar
-3 votes
1 answer
238 views

How to display a block on the home page when the user is authenticated or anonymous?

I created two custom blocks. I want to display its two blocks only when the home page view is empty. I want the custom block with id 11 to be displayed for anonymous users. I want the custom block ...
francky's user avatar
-3 votes
1 answer
31 views

How can I create a page with four content types displayed with infinite scroll? [closed]

I need a page where i display a list of 4 contents types articles. The articles for each content type must grouped, and when scrolling i want load page for each groupe. What is the better way to do ...
user96679's user avatar
-3 votes
1 answer
26 views

Today is in list of dates

Trying to check if variable 'today' is in a list of dates in Views Conditional Field. Both values print out nicely. Today (var php): 24/06/2019 List of dates (var field_dates): 24/06/2019, 25/06/...
Filip's user avatar
  • 13
-3 votes
1 answer
341 views

How to display a vocabulary term list with node count?

How can you display a vocabulary term list with node count? I have a vocabulary named books authors, I want to display a list of the terms which includes the total number of nodes next to each term. ...
Moin Khan's user avatar
-3 votes
1 answer
233 views

Filter out script tags in a view but leave link (from user input)

Users of my site will enter their twitter widget code into a field for their profile: <a class="twitter-timeline" href="https://twitter.com/ussername" data-widget-id="400306334257818144">...
Evanss's user avatar
  • 2,026
-3 votes
1 answer
222 views

How to convert the php array format to javascript array format

I uploaded the Beautytips module and I was able with some help from a member of this site to integrate some code into views, but I could not convert the PHP array format into JavaScript format. The ...
Sarmad's user avatar
  • 49
-3 votes
2 answers
59 views

Php error views template

I am trying to implement this function in my code, to handle language fallback, but it doesn't really work: The content is not in the correct language. I am trying to use field_language('node', $node, ...
user18400's user avatar
-3 votes
1 answer
36 views

Displaying menu items? [closed]

I am trying to create a view by pulling in a secondary menu I created. How do I do this? I would like 8 items displayed over two columns (which means 4 items in each column) on the homepage.
kine456's user avatar
  • 1,153
-3 votes
1 answer
88 views

How to get this hierarchial view [duplicate]

Possible Duplicate: Clean way of building simple taxonomy browser of arbitrary depth Here Bachelor of programme -- Parent hierarchial term Year 1 -- Child term of Bachelor of programme Term 1 --...
Manju's user avatar
  • 25
-3 votes
1 answer
101 views

How do I add an exposed form to search products?

I installed the Search API module and followed the documentation to set up an index and a search box using views and facets. It doesn't show an exposed form to search, even though there is a view and ...
wilburunion's user avatar
-3 votes
2 answers
66 views

How do I solve this error?

I started facing AJAX issues on my site, due to which I was unable to create views. Googling, I found that updating the Views module might help. I added a new Views module under all/sites/modules/...
New User's user avatar
-3 votes
1 answer
1k views

Drupal 7 dpm an object, but not sure how to render a recursion variable?

In Drupal 7 Views php. I'm trying to render and string replace the content:path field by using a global PHP views field. The issue I'm having is i'm not sure how to reference the content:path field as ...
Patoshi パトシ's user avatar
-3 votes
1 answer
42 views

How to change a view field programatically

I want to change the result of a view field in a custom module.I’m not sure which of the hooks to use for this there are not a lot of examples of how to use the views hooks for d8
Diana's user avatar
  • 3,308
-4 votes
1 answer
102 views

How would one encrypt or protect a Drupal 7 Views Configuration Recipe from prying eyes?

I spent quite a number of days developing a Views configuration recipe and I would like to protect it from other's stealing this by just viewing the Views page. Is there a module or a way to encrypt a ...
Patoshi パトシ's user avatar
-4 votes
2 answers
704 views

How i can add a refresh button in the views? [closed]

How i can add a button to refresh new content in views pages or blocks? like new tweets in twitter's timeline. Thanks
Reza Abbasian's user avatar
-4 votes
1 answer
2k views

How to link to a file in twig template

I'm trying to link to a file in a view. I have a field in the view that outputs the link if I use it like this: <div class="product-cta-view-pdf"> {{ fields.field_notice.content }} </div&...
FonsVC's user avatar
  • 111
-4 votes
1 answer
31 views

Article "promoted to front page" also displays all images of featured slideshow [closed]

Currently using Shinbun theme and Drupal 7 (based on an existing site, as required for a project) and was struggling to create a slideshow of selected images, which I finally managed on the article ...
Yen2019's user avatar
-4 votes
1 answer
791 views

How can i rewrite the views table output for endless scroll

I use the module views load more and for an horizontal infinite scroll i want only one row with many columns. When i click on the load more button, views rendered every new page as a table. Like this: ...
Bruno's user avatar
  • 327
-4 votes
1 answer
483 views

How to store Sharethis Values in the Database?

I am using the Sharethis Module and i want to sort some views by the number of total shares. But if i am understanding it correctly the values are not stored in the drupal database. Instead they are ...
oll's user avatar
  • 724
-5 votes
1 answer
366 views

How do I execute PHP code in a view?

There are myriad applications to need to execute specific PHP functions in Views rows. In many cases, making a custom Plugin is a better option. In other cases, it's better to use a Twig or custom ...
TripodC's user avatar
  • 41
-5 votes
1 answer
1k views

how to get url of link to content in twig? [closed]

I just created one view block to show all my blogs in it. I am getting all fields in twig but unable to call "link to content" to current node of every blog from view block. Any solution ...
Ravi Garnepally's user avatar
-5 votes
1 answer
897 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 ...
user avatar
-5 votes
1 answer
191 views

How to select a specific row in views-view.tpl.php? [closed]

I'm customizing a specific views block and trying to separate the 2 first rows in a "top" div(wrape it)
Doc Kodam's user avatar
  • 115
-5 votes
2 answers
225 views

Node repeat in a view

I have a content type called "daily". I created 7 nodes titled: Monday, Tuesday, Wednesday, Thursday, Friday, Saturday and Sunday. I have a view that shows this content type where it set to show only ...
yogi Moh's user avatar
-5 votes
1 answer
604 views

How to display nodes in order on a daily base

I would like to display node of a specific content type with views. I want one node to be display every day in order based on node id and the node to change every day.
FarhangDarzi's user avatar