ajax nav for productions is working

This commit is contained in:
Bachir Soussi Chiadmi
2018-03-05 18:06:16 +01:00
parent 797015b8a5
commit b64a2b289e
9 changed files with 152 additions and 13 deletions
@@ -7,12 +7,23 @@
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Template\Attribute;
// function edlptheme_preprocess_input(&$vars){
// dsm($vars, 'vars');
// $vars['attributes']['placeholder'] = "salut";
// }
function edlptheme_preprocess_node(&$vars){
$node = $vars['elements']['#node'];
$options = ['absolute' => TRUE];
$url = \Drupal\Core\Url::fromRoute('entity.node.canonical', ['node' => $node->id()], $options);
$system_path = $url->getInternalPath();
$vars['link_attributes'] = new Attribute(array(
'data-drupal-link-system-path' => $system_path=='' ? '<front>' : $system_path
));
}
/**
* Implements hook_form_alter
*/