Drupal: how to get arguments as header / footer / empty

I found this piece of code:
<?php
$view = views_get_current_view();
$arg0 = $view->args[0];
?>

but I don't know where to start embedding this piece of php code.

+3
source share
1 answer

You want to use the view argument in your header, footer, or empty text fields.

You must enter this code in the main view settings.

  • Edit your view - Administration → Create a site → Views → List, then click “Edit” for the view you want to change.
  • Click "Default" or one of the other displays for your view (for example, "Page", "Block", etc.).
  • " " , . , , "" , "", .
  • " ", , "PHP Code".
  • , - .
  • "", . "", .
+6

Source: https://habr.com/ru/post/1748643/


All Articles