Skip to main content
Drupal 8

Main navigation

  • Home
    • Question And Answer
    • NEWS
    • Projects
  • Tutorials - Drupal
    • Android
    • Other
User account menu
  • Log in

Breadcrumb

  1. Home

Views

By editor , 1 November, 2018

Alter Views title programmatically on Drupal 8

Tags

  • Drupal 8
  • Code
  • Views
  • Hook

function MYMODULE_views_pre_render(ViewExecutable $view) {
 if ($view->id() == 'ABC') {
  $view->setTitle('MY CUSTOM TITLE');
 }
}

By editor , 13 September, 2017

Render a Node or an Entity

Tags

  • Drupal 8
  • Code
  • Views
  • Node
  • Field
  • Drupal 9

On drupal 8 every elements (almost) are an entity, as any entity you can render a node.

By editor , 5 June, 2017

Views template suggestion files

Tags

  • Drupal 8
  • Code
  • Views
  • Theming

All views templates can be overridden with a variety of names, using the view, the display ID of the view, the display type of the view, or some combination thereof.

By editor , 3 March, 2017

Create a View Plugin Without using Database field

Tags

  • Drupal 8
  • Code
  • Module
  • Views

Step 1. Create a custom module and add the HOOK hook_views_data_alter(&$data). Here module : mymodule

Step 2.

By editor , 10 February, 2017

Insert a view on a custom page or block

Tags

  • Drupal 8
  • Code
  • Views

This tutorial show toy how to insert an existing views into a custom page or custom block.

 

By editor , 11 October, 2016

Custom Views Data handler for a custom Entity on drupal 8

Tags

  • Drupal 8
  • Code
  • Entity
  • Views

Once created your entity as Basic Entity or Full Entity, you can add a custom views handler.

By editor , 30 September, 2016

Alter a view. Edit view result programmatically

Tags

  • Drupal 8
  • Code
  • Views
  • Drupal 9

Example : Change title

By editor , 29 August, 2016

Change Date format on Views BEF

Tags

  • Drupal 8
  • Code
  • Drupal 7
  • Views

There are several methodes.

Change date format Using custom module.

By editor , 11 August, 2016

BEF : Views Exposed filter Options

Tags

  • Drupal 8
  • Drupal 7
  • Views

Group exposed fields of a view exposed form.

  1. Install the module "Better Exposed Filters" (BEF).[drush en better_exposed_filters -y]
  2. Go to : THE_VIEW-> Advanced -> Exposed form
  3. Set : Exposed form style = Better Exposed Filters
  4. Go to
By editor , 5 August, 2016

Views Complex Filters

Tags

  • Drupal 8
  • Drupal 7
  • Views

Filter contents from two different content types with two different fields.

  1. Add two fields to the field list
  2. Add "Global: Combine fields filter"
  3. Add conditoin EX : contains 1

Pagination

  • 1
  • Next page
Views

Links

  • Drupal.org
  • Drupal core release cycle
  • Drupal events with ease
  • Unit test with Drupal using PHPUnit (Drupal 10)
  • Tokens for file upload url
  • Tips for Docker
  • CKEditor inline image files usage for custom forms.
  • Install Docker on Linux Mint
  • Install PHP 8.1
  • Drupal Security Best Practices
  • Order and sort items with tabledrag
  • Add a custom service YAML container
  • Apply a patch with composer