Dificulties in modifying or duplicating a view


Instead of creating multiple views, have you considered using additional displays from the base view instead? That way they can share common configuration, but you can do things like apply a contextual filter to just certain displays.

Tags: Views / Drupal 8

Similar questions

Ajax pager failure in view after modifying view on hook_views_query_alter
The requirement is for different pages on the website to show different Twitter feeds according to the current page. There is a context (triggered according to the path) that inserts a view block into the footer. A custom module kicks in when the query for the view block is about to be executed. The module does some simple processing to determine w...
Drupal 7: Modifying the view page and edit form of a content type programmatically
a Drupal newbie here trying to create his first module for Drupal 7. In my site I've created a new content type (machine name: abstract) from the site's admin's front-end. A user can add a new instance of this content type by using a form I've defined using the FAPI. In this form's submit function I do the following: As shown above, I define the pa...
Modifying user view to display correct gender
In Drupal 7.21 with ulogin 7.x-1.10 I get following records in the database for male (having sex=2 in the JSON array below) and female (they have sex=1) users: And I have this part in my own custom Drupal module: This produces the following user page with wrong gender: I realise that my question is very chaotic and apologize for the Russian languag...
Changing a filter in a view without modifying the filter clone?
I duplicated a block from view using clone display, but when I change the language on the block cloned filter, the filter is changed in the master view also. How to avoid this? I need 3 blocks, the block to master the English language and the other 2 blocks to English and Spanish. Thank you
Programmatically modifying global custom text field in view
I have a (Apache solr) view with a Global: Custom text field in addition to my normal fields. This field is meant to get value from a custom function/existing field/passing an existing field to a custom function and using return value in one of my modules per each result and I am trying to accomplish this functionality without using Views PHP modul...
Modifying $view in hook_views_pre_render()
I'm using Drupal 8.0.5, and need to force a title on a View. I've tried various Views hooks, but will focus on hook_views_pre_render(). There's a ViewExecutable $view taken as an argument, which is not passed by reference. I've tried: I've gone through step-debugging to ensure it's getting called, but it seems the setTitle method does not affect th...

Also ask

We use cookies to deliver the best possible experience on our website. By continuing to use this site, accepting or closing this box, you consent to our use of cookies. To learn more, visit our privacy policy.