Skip to content

Commit

Permalink
Readded nocache for bandi
Browse files Browse the repository at this point in the history
  • Loading branch information
arrubiu committed Nov 23, 2017
1 parent abb5d69 commit 1e0aab7
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
16 changes: 16 additions & 0 deletions modules/custom/bandi/bandi.module
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

/**
* Implements hook_theme().
*/
function bandi_theme($existing, $type, $theme, $path) {
return array(
'bandipdf' => [
'variables' => [
'title' => NULL,
'content' => [],
'url' => NULL,
],
],
);
}
2 changes: 2 additions & 0 deletions modules/custom/bandi/bandi.routing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ bandi.pdf:
_title_callback: '\Drupal\bandi\Controller\PdfController::title'
requirements:
_permission: 'access content'
options:
no_cache: 'TRUE'
2 changes: 1 addition & 1 deletion modules/custom/bandi/src/Controller/PdfController.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public function view(EntityInterface $node, $view_mode = 'pdf', $langcode = NULL
'#theme' => 'bandipdf',
'#title' => parent::title($node),
'#content' => parent::view($node, $view_mode, $langcode),
//'#cache' => ['max-age' => 0,],
'#cache' => ['max-age' => 0,],
];

$output = render($build);
Expand Down

0 comments on commit 1e0aab7

Please sign in to comment.